%-------------------------------------------------------------------------% % % Licensed to the Apache Software Foundation (ASF) under one or more % contributor license agreements. See the NOTICE file distributed with % this work for additional information regarding copyright ownership. % The ASF licenses this file to You under the Apache License, Version 2.0 % (the "License"); you may not use this file except in compliance with % the License. You may obtain a copy of the License at % % http://www.apache.org/licenses/LICENSE-2.0 % % Unless required by applicable law or agreed to in writing, software % distributed under the License is distributed on an "AS IS" BASIS, % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % See the License for the specific language governing permissions and % limitations under the License. % %-------------------------------------------------------------------------% :- module owl. %-------------------------------------------------------------------------% % %-------------------------------------------------------------------------% :- interface. :- import_module rdf. :- import_module string. :- func owl(string) = string. :- mode owl(in) = out is det. :- mode owl(out) = in is semidet. :- pred isClass(graph, string). :- mode isClass(in, in) is semidet. :- mode isClass(in, out) is multi. :- pred subClassOf(graph, string, string). :- mode subClassOf(in, in, in) is semidet. :- mode subClassOf(in, in, out) is multi. :- mode subClassOf(in, out, in) is multi. :- mode subClassOf(in, out, out) is multi. :- pred sameAs(graph, string, string). :- mode sameAs(in, in, in) is semidet. :- mode sameAs(in, out, in) is multi. :- mode sameAs(in, in, out) is multi. :- implementation. owl(S) = "http://www.w3.org/2002/07/owl#" ++ S. isClass(_, owl("Thing")). isClass(_, owl("Nothing")). isClass(G, U) :- property(G, U, rdf("type"), owl("Class")). sameAs(G, A, B) :- A = B; property(G, A, owl("sameAs"), B); property(G, B, owl("sameAs"), A).