%\documentclass{article}
%\usepackage{rotating}
%\usepackage{tabularx}
%
%\begin{document}
%
\begin{sidewaystable}
% Table generated by Excel2LaTeX from sheet 'Policies'
\begin{tiny}
\begin{tabularx}{9.2in}{|rl|X|X|X|X|X|}
\hline
  &            & {\bf USE Restriction} &  {\bf USE Inclusion} &  {\bf USE Exclusion} & {\bf USE Chaining} & {\bf USE Default Deny} \\
\hline
 {\bf Single} & AIR rule(s) & :W s:triplePattern :T. \newline
:T log:includes { [] type:SSN :V }. \newline
:W s:triplePattern :U. \newline
:U log:includes { :V [] [] }. & Unsupported. & Unsupported. & :W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 }. \newline
:W s:triplePattern :U1. \newline
:U1 log:includes { :V1 [] [] }. \newline
 \newline
:W s:triplePattern :T2. \newline
:T log:includes { [] type:B :V2 }. \newline
:W s:triplePattern :U2. \newline
:U2 log:includes { :V2 [] [] }. & :W s:triplePattern :T. \newline
:T log:notIncludes { [] type:A [] } . \\ \cline{2-7}

           & Description & Cannot use anything of type:A. & - & - & If using type:A, must not use type:B. & May only use type:A. \\\cline{2-7}

           & Action & air:assert { :Q air:non-compliant-with :Whatever-Policy }; &       - &       - & If first rule matches, assert non-compliance if second rule matches. Default is compliance. (Can have negated version as well.) & Assert non-compliance, since you found something other than type:A. No distinction between USE and RETRIEVE. \\
\hline
          {\bf Multiple} & AIR rule(s) & :W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 }. \newline
:W s:triplePattern :U1. \newline
:U1 log:includes { :V1 [] [] }. \newline
 \newline
:W s:triplePattern :T2. \newline
:T log:includes { [] type:B :V2 }. \newline
:W s:triplePattern :U2. \newline
:U2 log:includes { :V2 [] [] }. & :W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 }. \newline
:W s:triplePattern :U1. \newline
:U1 log:includes { :V1 [] [] }. \newline
:W s:triplePattern :T2. \newline
:T log:includes { [] type:B :V2 }. \newline
:W s:triplePattern :U2. \newline
:U2 log:includes { :V2 [] [] }. \newline
 \newline
:W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 }. \newline
:W s:triplePattern :U1. \newline
:U1 log:includes { :V1 [] [] }. \newline
 \newline
:W s:triplePattern :T2. \newline
:T log:includes { [] type:B :V2 }. \newline
:W s:triplePattern :U2. \newline
:U2 log:includes { :V2 [] [] }. & :W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 }. \newline
:W s:triplePattern :U1. \newline
:U1 log:includes { :V1 [] [] }. \newline
:W s:triplePattern :T2. \newline
:T log:includes { [] type:B :V2 }. \newline
:W s:triplePattern :U2. \newline
:U2 log:includes { :V2 [] [] }. & :W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 }. \newline
:W s:triplePattern :U1. \newline
:U1 log:includes { :V1 [] [] }. \newline
 \newline
:W s:triplePattern :T2. \newline
:T log:includes { [] type:B :V2 }. \newline
:W s:triplePattern :U2. \newline
:U2 log:includes { :V2 [] [] }. \newline
 \newline
:W s:triplePattern :T3. \newline
:T log:includes { [] type:C :V3 }. \newline
:W s:triplePattern :U3. \newline
:U3 log:includes { :V3 [] [] }. & :W s:triplePattern :T. \newline
:T log:notIncludes { [] type:A [] } . \newline
:T log:notIncludes { [] type:B [] } . \\ \cline{2-7}

           & Description & Cannot use anything of type:A or type:B. Action is taken if any pattern matches. Defaults to compliance. & If using type:A, must also use type:B. All or none. & Cannot use type:A and type:B. Generalizes to MAX(N-1,N) & If using type:A must not use type:B or type:C. & May only use type:A or type:B. \\ \cline{2-7}

           & Action & air:assert { :Q air:non-compliant-with :Whatever-Policy }; & Assert compliance if first pattern is met. Assert non-compliance if any remaining patterns are met. Assert compliance if no patterns at all are met. & Assert non-compliance. & If first rule matches, assert non-compliance if any of the following rules match. Default is compliance. (Can have negated version as well.) & Assert non-compliance, since you found something other than type:A or type:B. No distinction between USE and RETRIEVE. \\
\hline
     {\bf Notes} & &  :Q a s:SPARQLQuery; \newline
    s:retrieve :P; \newline
    s:clause :W. & We can create hybrid policies, i.e. "if using type:A must retrieve type:B and vice versa". & We can create hybrid policies, i.e. "may do all but one of: use type:A, retrieve type:B". & Hybrids possible. Can only have one type on the left hand side. Doing an AND is easy, the OR involves combinatorics. We can have mandatory filters using this policy. & Hybrids possible. Can simplify to { [] type:X [] } for "any access". USE or RETRIEVE are special cases. \\
\hline
\end{tabularx}
\end{tiny}
\caption{Automatic policy generation: USE.}
\label{translator-table-use}
\end{sidewaystable}



\begin{sidewaystable}
% Table generated by Excel2LaTeX from sheet 'Policies'
\begin{tiny}
\begin{tabularx}{9.2in}{|rl|X|X|X|X|X|}
\hline
  &            & {\bf RETRIEVE Restriction} &  {\bf RETRIEVE Inclusion} &  {\bf RETRIEVE Exclusion} & {\bf RETRIEVE Chaining} & {\bf RETRIEVE Default Deny} \\
\hline
{\bf Single} & AIR Rule(s) & 
:P s:var :V1. \newline
:W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 } & Unsupported. & Unsupported. & 
:P s:var :V1. \newline
:W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 } \newline
 \newline
:P s:var :V2. \newline
:W s:triplePattern :T2. \newline
:T2 log:includes { [] type:B :V2 } &            \\ \cline{2-7}

           & Description & Cannot see type:A, it is restricted. & - & - & If retrieve type:A, must not retrieve type:B. &            \\ \cline{2-7}

           & Action & air:assert { :Q air:non-compliant-with :Whatever-Policy }; &       None &       None & If first rule matches, assert non-compliance if second rule matches, and compliance if second rule fails. & No distinction between USE and RETRIEVE. See USE table. \\
\hline
          {\bf Multiple} & AIR Rule(s) & 
:P s:var :V1. \newline
:W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 } \newline
 \newline
:P s:var :V2. \newline
:W s:triplePattern :T2. \newline
:T2 log:includes { [] type:B :V2 } & :P s:var :V1. \newline
:W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 } \newline
:P s:var :V2. \newline
:W s:triplePattern :T2. \newline
:T2 log:includes { [] type:B :V2 } \newline
 \newline
:P s:var :V1. \newline
:W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 } \newline
 \newline
:P s:var :V2. \newline
:W s:triplePattern :T2. \newline
:T2 log:includes { [] type:B :V2 } & :P s:var :V1. \newline
:W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 } \newline
:P s:var :V2. \newline
:W s:triplePattern :T2. \newline
:T2 log:includes { [] type:A :V2 } & :P s:var :V1. \newline
:W s:triplePattern :T1. \newline
:T1 log:includes { [] type:A :V1 } \newline
 \newline
:P s:var :V2. \newline
:W s:triplePattern :T2. \newline
:T2 log:includes { [] type:B :V2 } \newline
 \newline
:P s:var :V3. \newline
:W s:triplePattern :T3. \newline
:T3 log:includes { [] type:C :V3 } &            \\ \cline{2-7}

           & Description & Cannot see type:A or type:B, they are restricted. Take action of any pattern matches. & If retrieving type:A, must also use type:B. All or none. & Cannot retrieve type:A and type:B. Generalizes to MAX(N-1,N) & If retrieve type:A must not retrieve type:B or type:C. &            \\ \cline{2-7}

           & Action & air:assert { :Q air:non-compliant-with :Whatever-Policy }; & Assert compliance if first pattern is met. Assert non-compliance if any remaining patterns are met. Assert compliance if no patterns at all are met. & Assert non-compliance. & If first rule matches, assert non-compliance if any of the following rules match, and compliance if they all fail. & No distinction between USE and RETRIEVE. See USE table. \\
\hline
     {\bf Notes} & &  & We can create hybrid policies, i.e. "if using type:A must retrieve type:B and vice versa". & We can create hybrid policies, i.e. "may do all but one of: use type:A, retrieve type:B". & Hybrids possible. Can only have one type on the left hand side. Doing an AND is easy, the OR involves combinatorics. We can have mandatory filters using this policy. & Hybrids possible. Can simplify to { [] type:X [] } for "any access". USE or RETRIEVE are special cases. \\
\hline
\end{tabularx}
\end{tiny}
\caption{Automatic policy generation: RETRIEVE.}
\label{translator-table-retrieve}
\end{sidewaystable}
%
%
%\end{document}