<commit_before>/******************************************************************
 * File:        TransitiveReasonerFactory.java
 * Created by:  <NAME>
 * Created on:  19-Jan-03
 * 
 * (c) Copyright 2003, Hewlett-Packard Company, all rights reserved.
 * [See end of file]
 * $Id: TransitiveReasonerFactory.java,v 1.5 2003-05-27 15:50:24 der Exp $
 *****************************************************************/
package com.hp.hpl.jena.reasoner.transitiveReasoner;

import com.hp.hpl.jena.mem.ModelMem;
import com.hp.hpl.jena.rdf.model.*;
import com.hp.hpl.jena.vocabulary.*;
import com.hp.hpl.jena.reasoner.*;

/**
 * Factory class for creating blank instances of the transitive reasoner.
 * 
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @version $Revision: 1.5 $ on $Date: 2003-05-27 15:50:24 $
 */
public class TransitiveReasonerFactory implements ReasonerFactory {
    
    /** Single global instance of this factory */
    private static ReasonerFactory theInstance = new TransitiveReasonerFactory();
    
    /** Cache of the capabilities description */
    protected Model capabilities;
    
    /** Static URI for this reasoner type */
    public static final String URI = "http://www.hpl.hp.com/semweb/2003/TransitiveReasoner";
    
    /**
     * Return the single global instance of this factory
     */
    public static ReasonerFactory theInstance() {
        return theInstance;
    }
    
    /**
     * Constructor method that builds an instance of the associated Reasoner
     * @param configuration a set of arbitrary configuration information to be 
     * passed the reasoner encoded within an RDF graph.
     */
    public Reasoner create(Model configuration) {
        return new TransitiveReasoner();
    }
   
    /**
     * Return a description of the capabilities of this reasoner encoded in
     * RDF. This method is normally called by the ReasonerRegistry which caches
     * the resulting information so dynamically creating here is not really an overhead.
     */
    public Model getCapabilities() {
        if (capabilities == null) {
            capabilities = new ModelMem();
            Resource base = capabilities.createResource(getURI());
            base.addProperty(ReasonerRegistry.nameP, "Transitive Reasoner")
                .addProperty(ReasonerRegistry.descriptionP, "Provides reflexive-transitive closure of subClassOf and subPropertyOf")
                .addProperty(ReasonerRegistry.supportsP, RDFS.subClassOf)
                .addProperty(ReasonerRegistry.supportsP, RDFS.subPropertyOf)
                .addProperty(ReasonerRegistry.supportsP, TransitiveReasoner.directSubClassOf)
                .addProperty(ReasonerRegistry.supportsP, TransitiveReasoner.directSubPropertyOf)
                .addProperty(ReasonerRegistry.versionP, "0.1");
        }
        return capabilities;
    }
    
    /**
     * Return the URI labelling this type of reasoner
     */<commit_msg>Minor bug fix: capabilities was not listing the direct sub-class-of property, only the underlying node, which therefore was not recognised in a call to supportsProperty()<commit_after>/******************************************************************
 * File:        TransitiveReasonerFactory.java
 * Created by:  <NAME>
 * Created on:  19-Jan-03
 * 
 * (c) Copyright 2003, Hewlett-Packard Company, all rights reserved.
 * [See end of file]
 * $Id: TransitiveReasonerFactory.java,v 1.6 2003-06-06 10:20:58 ian_dickinson Exp $
 *****************************************************************/
package com.hp.hpl.jena.reasoner.transitiveReasoner;

import com.hp.hpl.jena.mem.ModelMem;
import com.hp.hpl.jena.rdf.model.*;
import com.hp.hpl.jena.vocabulary.*;
import com.hp.hpl.jena.reasoner.*;

/**
 * Factory class for creating blank instances of the transitive reasoner.
 * 
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @version $Revision: 1.6 $ on $Date: 2003-06-06 10:20:58 $
 */
public class TransitiveReasonerFactory implements ReasonerFactory {
    
    /** Single global instance of this factory */
    private static ReasonerFactory theInstance = new TransitiveReasonerFactory();
    
    /** Cache of the capabilities description */
    protected Model capabilities;
    
    /** Static URI for this reasoner type */
    public static final String URI = "http://www.hpl.hp.com/semweb/2003/TransitiveReasoner";
    
    /**
     * Return the single global instance of this factory
     */
    public static ReasonerFactory theInstance() {
        return theInstance;
    }
    
    /**
     * Constructor method that builds an instance of the associated Reasoner
     * @param configuration a set of arbitrary configuration information to be 
     * passed the reasoner encoded within an RDF graph.
     */
    public Reasoner create(Model configuration) {
        return new TransitiveReasoner();
    }
   
    /**
     * Return a description of the capabilities of this reasoner encoded in
     * RDF. This method is normally called by the ReasonerRegistry which caches
     * the resulting information so dynamically creating here is not really an overhead.
     */
    public Model getCapabilities() {
        if (capabilities == null) {
            capabilities = new ModelMem();
            Resource base = capabilities.createResource(getURI());
            base.addProperty(ReasonerRegistry.nameP, "Transitive Reasoner")
                .addProperty(ReasonerRegistry.descriptionP, "Provides reflexive-transitive closure of subClassOf and subPropertyOf")
                .addProperty(ReasonerRegistry.supportsP, RDFS.subClassOf)
                .addProperty(ReasonerRegistry.supportsP, RDFS.subPropertyOf)
                .addProperty(ReasonerRegistry.supportsP, ReasonerVocabulary.directSubClassOf)
                .addProperty(ReasonerRegistry.supportsP, ReasonerVocabulary.directSubPropertyOf)
                .addProperty(ReasonerRegistry.versionP, "0.1");
        }
        return capabilities;
    }
    
    /**
     * Return the URI labelling this type of reasoner
     */
{'fraction_non_alphanumeric': 0.1294546660036466, 'fraction_numerical': 0.01524946129620421, 'mean_word_length': 3.113156100886162, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2373547', 'n_tokens_mistral': 1690, 'n_tokens_neox': 1567, 'n_words': 466}