/projects/jena-2.6.3/com/hp/hpl/jena/reasoner/rulesys/RDFSRuleInfGraph.java
https://gitlab.com/essere.lab.public/qualitas.class-corpus · Java · 94 lines · 18 code · 9 blank · 67 comment · 0 complexity · 0e1d76696f569c592a388bd7de43e421 MD5 · raw file
- /******************************************************************
- * File: RDFSRuleInfGraph.java
- * Created by: Dave Reynolds
- * Created on: 22-Jun-2003
- *
- * (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
- * [See end of file]
- * $Id: RDFSRuleInfGraph.java,v 1.1 2009/06/29 08:55:38 castagna Exp $
- *****************************************************************/
- package com.hp.hpl.jena.reasoner.rulesys;
-
- import com.hp.hpl.jena.reasoner.*;
- import com.hp.hpl.jena.graph.*;
- import java.util.*;
-
- /**
- * Customization of the generic rule inference graph for RDFS inference.
- * In fact all the rule processing is unchanged, the only extenstion is
- * the validation support.
- *
- * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
- * @version $Revision: 1.1 $ on $Date: 2009/06/29 08:55:38 $
- */
- public class RDFSRuleInfGraph extends FBRuleInfGraph {
-
- /**
- * Constructor.
- * @param reasoner the reasoner which created this inf graph instance
- * @param rules the rules to process
- * @param schema the (optional) schema graph to be included
- */
- public RDFSRuleInfGraph(Reasoner reasoner, List<Rule> rules, Graph schema) {
- super(reasoner, rules, schema);
- }
-
- /**
- * Constructor.
- * @param reasoner the reasoner which created this inf graph instance
- * @param rules the rules to process
- * @param schema the (optional) schema graph to be included
- * @param data the data graph to be processed
- */
- public RDFSRuleInfGraph(Reasoner reasoner, List<Rule> rules, Graph schema, Graph data) {
- super(reasoner, rules, schema, data);
- }
-
- /**
- * Test the consistency of the bound data. For RDFS this checks that all
- * instances of datatype-ranged properties have correct data values.
- *
- * @return a ValidityReport structure
- */
- @Override
- public ValidityReport validate() {
- // The full configuration uses validation rules so check for these
- StandardValidityReport report = (StandardValidityReport)super.validate();
- // Also do a hardwired check to handle the simpler configurations
- performDatatypeRangeValidation(report);
- return report;
- }
-
- }
-
-
-
- /*
- (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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.
- */