File:  [Public] / java / classes / org / w3c / rdf / Validation.java
Revision 1.1: download - view: text, annotated - select for diffs
Thu Apr 1 09:33:00 1999 UTC (25 years, 2 months ago) by jsaarela
Branches: MAIN
CVS tags: rel-2-2, HEAD
SiRPAC distribution release V1.11 on 1-Apr-99

package org.w3c.rdf;

public class Validation
{
    public final static String RULES =
"FORALL Message,Resource,Predicate,Correct <-" +
"  problem(Message,Resource,Predicate,Correct)." +
"" +
"FORALL Predicate,Correct,Resource" +
"  problem(\"Domain constraint violation\", Resource, Predicate, Correct) <-" +
"  domainSet(Resource,Predicate,Correct)," +
"  not domainOK(Predicate)." +
"" +
"FORALL Predicate,Correct,Resource" +
"  problem(\"Range constraint violation\", Resource, Predicate, Correct) <-" +
"  rangeSet(Resource,Predicate,Correct)," +
"  not rangeOK(Predicate)." +
"" +
"FORALL Predicate" +
"  domainOK(Predicate) <-" +
"    EXISTS Resource,Domain,Class,Value" +
"    Predicate[\"http://www.w3.org/TR/1999/PR-rdf-schema-19990303#domain\" ->> Domain]," +
"    Resource[\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\" ->> Class;" +
"             Predicate->>Value]," +
"    Class :: Domain." +
"" +
"FORALL Resource,Predicate,Class" +
"  domainSet(Resource,Predicate,Class) <- " +
"    EXISTS Value" +
"    Resource[Predicate->>Value]," +
"    Predicate[\"http://www.w3.org/TR/1999/PR-rdf-schema-19990303#domain\" ->> Class]." +
"" +
"FORALL Predicate" +
"  rangeOK(Predicate) <-" +
"    EXISTS Resource,Range,Class,Value" +
"    Predicate[\"http://www.w3.org/TR/1999/PR-rdf-schema-19990303#range\" ->> Range]," +
"    Resource[Predicate->>Value]," +
"    Value[\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\" ->> Class]," +
"    Class :: Range." +
"" +
"FORALL Resource,Predicate,Class" +
"  rangeSet(Resource,Predicate,Class) <- " +
"    EXISTS Value" +
"    Resource[Predicate->>Value]," +
"    Predicate[\"http://www.w3.org/TR/1999/PR-rdf-schema-19990303#range\" ->> Class]." +
"" +
"FORALL Object" +
"  problem (\"User-defined constraint not validated\", Object, \"-\", \"-\") <-" +
"      Object[\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\" ->>" +
"             \"http://www.w3.org/TR/1999/PR-rdf-schema-19990303#ConstraintProperty\"]." +
"" +
"FORALL Object" +
"  problem (\"User-defined constraint not validated\", Object, \"-\", \"-\") <-" +
"      Object[\"http://www.w3.org/TR/1999/PR-rdf-schema-19990303#subClassOf\" ->>" +
"             \"http://www.w3.org/TR/1999/PR-rdf-schema-19990303#ConstraintProperty\"]." +
"" +
"FORALL X,Y " +
"   X :: Y <- X[\"http://www.w3.org/TR/1999/PR-rdf-schema-19990303#subClassOf\" ->> Y]" +
"   OR unify (X,Y)." +
"" +
"FORALL X,Y" +
"  X : Y <-         " +
"     X[\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\" ->> Y]" +
"  OR unify (X,Y).";
}


Webmaster