Major change
[u/philim/db2osl_thesis.git] / osl_spec.tex
CommitLineData
b96bb723
PM
1\section{Specification}
2\label{osl_spec}
3\newcounter{parcount}
4\newcommand{\parnum}{\textsuperscript{\arabic{parcount}}}
5\newcommand{\p}{\refstepcounter{parcount} \parnum \hspace{1em}}
6
7\p An \osl{} document is a valid \name{OWL} 2 document (as described in \cite{owl})
8containing individuals and data that represent the OBDA specification,
9as well as \name{OWL} properties that connect them.
10The individuals and \name{OWL} properties are recognized and mapped to their roles
11by their IRIs.
12
13\p \label{spec_ignored} An \osl{} document may contain more \name{OWL} entities
14(with IRIs not defined in this specification), which are ignored.
15
16\p An \osl{} document has to declare all individuals having different IRIs as different
17from each other (except those which are ignored, see Paragraph~\ref{spec_ignored}).\\
18It is recommended to use the \texttt{owl:AllDifferent} \name{OWL}
19statement for this purpose.
20
21\p \label{spec_base} Unless stated otherwise, IRIs mentioned in the following are
22IRIs relative to a base IRI chosen by the user being empty (which makes the IRIs
23absolute \cite{xmlbase}) or ending with a hash character (`\#').\\
24\newpage
25It is recommended to use that base IRI as \texttt{xml:base} XML attribute.\\
26IRIs prefixed with \texttt{osl:} are IRIs relative to the IRI\\
27\oslbaseurl{}\;.
28
29%\newpage
30\p An \osl{} document has to import the following ontology
31(referred to as ``the \osl{} header'' in the following):\\
32\oslheaderurl{}
33
34\p The \name{OWL} individuals described by the \osl{} document representing
35the certain types of OBDA maps
45d598e9 36must have the IRIs specified in Table~\ref{spec_tbl_indv_iris}
b96bb723
PM
37(for base IRIs, see Paragraph~\ref{spec_base}).
38Here, \textit{$<$class URI$>$} refers\\
39to the \texttt{OWL class URI} field of the respective entity map for entity maps,\\
40to the \texttt{OWL class URI} field of the associated entity map for identifier maps,\\
41to the \texttt{OWL class URI} field of the associated entity map for subtype maps and\\
42%\newpage
43to the \texttt{OWL class URI} field of the entity map associated with the respective subtype map
44for translation tables of subtype maps.\\
45Similarly, \textit{$<$property URI$>$} refers\\
46to the \texttt{OWL property URI} field of the respective attribute map for attribute maps
47(or, if it is empty, the value that would have been generated for it if it weren't empty),\\
48to the \texttt{OWL property URI} field of the respective relation map for relation maps and\\
49to the \texttt{OWL property URI} field of the respective attribute map
50for translation tables of attribute maps (or, if it is empty, the value that would have
51been generated for it if it weren't empty).
52
53%\vspace{\spacebeforetable{}}
54\KOMAoption{fontsize}{\smallerfontsize{}}
55\begin{table}[]\begin{center}
56 \begin{tabular}{l|l}
57 \textbf{Map type} & \textbf{\name{OWL} IRI} \\ \hline
45d598e9
PM
58 Entity map & $<$class URI$>$\texttt{\_\_ENTITY\_MAP} \\
59 Attribute map & $<$property URI$>$\texttt{\_\_ATTRIBUTE\_MAP} \\
60 Identifier map & $<$class URI$>$\texttt{\_\_IDENTIFIER\_MAP} \\
61 Relation map & $<$property URI$>$\texttt{\_\_RELATION\_MAP} \\
62 Subtype map & $<$class URI$>$\texttt{\_\_SUBTYPE\_MAP} \\
b96bb723 63 Translation table of attribute map &
45d598e9 64 $<$property URI$>$\texttt{\_\_ATTRIBUTE\_MAP\_\_TRANSLATION\_TABLE} \\
b96bb723 65 Translation table of subtype map &
45d598e9
PM
66 $<$class URI$>$\texttt{\_\_SUBTYPE\_MAP\_\_TRANSLATION\_TABLE} \\
67% % Slanted:
68% Entity map & \textit{$<$class URI$>$}\texttt{\_\_ENTITY\_MAP} \\
69% Attribute map & \textit{$<$property URI$>$}\texttt{\_\_ATTRIBUTE\_MAP} \\
70% Identifier map & \textit{$<$class URI$>$}\texttt{\_\_IDENTIFIER\_MAP} \\
71% Relation map & \textit{$<$property URI$>$}\texttt{\_\_RELATION\_MAP} \\
72% Subtype map & \textit{$<$class URI$>$}\texttt{\_\_SUBTYPE\_MAP} \\
73% Translation table of attribute map &
74% \textit{$<$property URI$>$}\texttt{\_\_ATTRIBUTE\_MAP\_\_TRANSLATION\_TABLE} \\
75% Translation table of subtype map &
76% \textit{$<$class URI$>$}\texttt{\_\_SUBTYPE\_MAP\_\_TRANSLATION\_TABLE} \\
b96bb723
PM
77 \end{tabular}
78 \caption{\name{OWL} individual IRIs in \osl{}}
79 \label{spec_tbl_indv_iris}
80\end{center}\end{table}
81\KOMAoption{fontsize}{\myfontsize{}}
82
83\p The \name{OWL} individuals described by the \osl{} document representing
84the certain types of OBDA maps
45d598e9 85must be of the \name{OWL} types specified in Table~\ref{spec_tbl_types}
b96bb723
PM
86(for base IRIs, see Paragraph~\ref{spec_base}).
87
88%\vspace{\spacebeforetable{}}
89\begin{table}[]\begin{center}
90 \begin{tabular}{l|l}
91 \textbf{Map type} & \textbf{\name{OWL} class IRI} \\ \hline
92 Entity map & \texttt{osl:EntityMap} \\
93 Attribute map & \texttt{osl:AttributeMap} \\
94 Identifier map & \texttt{osl:IdentifierMap} \\
95 Relation map & \texttt{osl:RelationMap} \\
96 Subtype map & \texttt{osl:SubtypeMap} \\
97 Translation table & \texttt{osl:TranslationTable} \\
98 \end{tabular}
99 \caption{\name{OWL} class membership of map representations in \osl{}}
100 \label{spec_tbl_types}
101\end{center}\end{table}
102
103\p The \name{OWL} properties described by the \osl{} document representing
104the fields of the certain OBDA maps
45d598e9 105must have the IRIs specified in Table~\ref{spec_tbl_prop_iris}
b96bb723
PM
106(for base IRIs, see Paragraph~\ref{spec_base}).
107
108%\vspace{\spacebeforetable{}}
109%\KOMAoption{fontsize}{\smallerfontsize{}}
110\begin{table}[]\begin{center}
111 \begin{tabular}{l|l|l|l}
112 \textbf{Map type} & \textbf{Field label} & \textbf{Field name} & \textbf{\name{OWL} IRI} \\ \hline
113 Entity map & \texttt{E1} & \texttt{Table name} & \texttt{osl:em\_\_tableName} \\
114 Entity map & \texttt{E2} & \texttt{Label} & \texttt{osl:em\_\_label} \\
115 Entity map & \texttt{E3} & \texttt{Identifier map} & \texttt{osl:em\_\_identifierMap} \\
116 Entity map & \texttt{E4} & \texttt{Attribute maps...} & \texttt{osl:em\_\_attributeMaps} \\
117 Entity map & \texttt{E5} & \texttt{OWL class URI} & \texttt{osl:em\_\_owlClassURI} \\
118 Entity map & \texttt{E6} & \texttt{Description} & \texttt{osl:em\_\_description} \\ \hline
119 Attribute map & \texttt{A1} & \texttt{Column name} & \texttt{osl:am\_\_columnName} \\
120 Attribute map & \texttt{A2} & \texttt{SQL datatype} & \texttt{osl:am\_\_sqlDatatype} \\
121 Attribute map & \texttt{A3} & \texttt{Mandatory} & \texttt{osl:am\_\_mandatory} \\
122 Attribute map & \texttt{A4} & \texttt{Label} & \texttt{osl:am\_\_label} \\
123 Attribute map & \texttt{A5} & \texttt{OWL property URI} & \texttt{osl:am\_\_owlPropertyURI} \\
124 Attribute map & \texttt{A6} & \texttt{Property type} & \texttt{osl:am\_\_propertyType} \\
125 Attribute map & \texttt{A7} & \texttt{Translation} & \texttt{osl:am\_\_translation} \\
126 Attribute map & \texttt{A8} & \texttt{URI pattern} & \texttt{osl:am\_\_uriPattern} \\
127 Attribute map & \texttt{A9} & \texttt{RDF language} & \texttt{osl:am\_\_rdfLanguage} \\
128 Attribute map & \texttt{A10} & \texttt{XSD datatype} & \texttt{osl:am\_\_xsdDatatype} \\
129 Attribute map & \texttt{A11} & \texttt{Description} & \texttt{osl:am\_\_description} \\ \hline
130 Identifier map & \texttt{I1} & \texttt{Entity map} & \texttt{osl:im\_\_entityMap} \\
131 Identifier map & \texttt{I2} & \texttt{Attribute maps...} & \texttt{osl:im\_\_attributeMaps} \\
132 Identifier map & \texttt{I3} & \texttt{URI pattern} & \texttt{osl:im\_\_uriPattern} \\ \hline
133 Relation map & \texttt{R1} & \texttt{Source entity map} & \texttt{osl:rm\_\_sourceEntityMap} \\
134 Relation map & \texttt{R2} & \texttt{Source column} &
135 \texttt{osl:rm\_\_sourceColumn\textcolor{red}{\textbf{s}}} \\
136 Relation map & \texttt{R3} & \texttt{Target entity map} & \texttt{osl:rm\_\_targetEntityMap} \\
137 Relation map & \texttt{R4} & \texttt{Target column} &
138 \texttt{osl:rm\_\_targetColumn\textcolor{red}{\textbf{s}}} \\
139 Relation map & \texttt{R5} & \texttt{OWL property URI} & \texttt{osl:rm\_\_owlPropertyURI} \\ \hline
140 Subtype map & \texttt{S1} & \texttt{Entity Map} & \texttt{osl:sm\_\_entityMap} \\
141 Subtype map & \texttt{S2} & \texttt{Column Name} & \texttt{osl:sm\_\_columnName} \\
142 Subtype map & \texttt{S3} & \texttt{OWL superclass URI} & \texttt{osl:sm\_\_owlSuperclassURI} \\
143 Subtype map & \texttt{S4} & \texttt{Prefix} & \texttt{osl:sm\_\_prefix} \\
144 Subtype map & \texttt{S5} & \texttt{Suffix} & \texttt{osl:sm\_\_suffix} \\
145 Subtype map & \texttt{S6} & \texttt{Translation} & \texttt{osl:sm\_\_translation} \\ \hline
146 Translation table & \texttt{T1} & \texttt{Source value...} &
147 \texttt{osl:tt\_\_sourceValue\textcolor{red}{\textbf{s}}} \\
148 Translation table & \texttt{T2} & \texttt{RDF ressource...} &
149 \texttt{osl:tt\_\_rdfRessource\textcolor{red}{\textbf{s}}} \\
150 \end{tabular}
151 \caption{\name{OWL} property IRIs in \osl{}}
152 \label{spec_tbl_prop_iris}
153\end{center}\end{table}
154%\KOMAoption{fontsize}{\myfontsize{}}
155
156%\newpage
157\p The following \name{OWL} properties in the \osl{} document refer
158to lists of elements:
159\begin{itemize}
160 \item[] \texttt{osl:rm\_\_sourceColumns}
161 \item[] \texttt{osl:rm\_\_targetColumns}
162 \item[] \texttt{osl:tt\_\_sourceValues}
163 \item[] \texttt{osl:tt\_\_rdfRessources}
164\end{itemize}
165Therefore, they have the \name{OWL} class \texttt{osl:StringListNode}
166as their range, as is required by the \osl{} header.
167They must connect the respective individual to an
168\texttt{osl:StringListNode} individual in every case.
169This ``root node'' must \emph{not} have an \texttt{osl:hasValue} property.\\
170If the represented list is not empty, the list elements are represented by other
171\texttt{osl:StringListNode} individuals connected seriatim by the property
172\texttt{osl:nextNode}, with the first individual being connected to the root node.
173The node representing the last list element must not have an
174\texttt{osl:nextNode} property.\\
175All nodes except the root node \emph{may} have an \texttt{osl:hasValue} property
176connecting them to their values.
177The actual list consists of exactly these values, thus, nodes without values
178are ignored.\\
179It is recommended to enumerate the node IRIs, using $0$ for the root node.