<commit_before>/*
 * (c) Copyright 2002, 2003, 2004 Hewlett-Packard Development Company, LP
 * [See end of file]
 */

package jena;

import jena.cmdline.*;

import java.util.*;
import com.hp.hpl.jena.ontology.tidy.test.WGTests;
import com.hp.hpl.jena.ontology.tidy.*;
import com.hp.hpl.jena.ontology.OntDocumentManager;
import com.hp.hpl.jena.ontology.OntModel;
import com.hp.hpl.jena.ontology.OntModelSpec;
import com.hp.hpl.jena.ontology.ProfileRegistry;
import com.hp.hpl.jena.shared.*;
import com.hp.hpl.jena.rdf.model.*;

import java.io.*;

/**
 * Implements the OWL Syntax Checker from the OWL Test Cases. Current known
 * weaknesses:
 * <ul>
 * <li>Does not report "Other" for non-RDF/XML files</li>
 * <li>Network error reporting on bad owl:imports has not been tested.</li>
 * </ul>
 * When two files are given on the command-line it treats the first as a
 * premises file and the second as a conclusion file and indicates the sort of
 * OWL reasoner that may be needed for testing the entailment. For example, if
 * both files are Lite but a URI is used as an individual in the first and a
 * class in the second then a Full reasoner is needed.
 * 
 * @author <NAME>
 * @version $Id: owlsyntax.java,v 1.5 2004-12-13 17:17:57 jeremy_carroll Exp $
 */
public class owlsyntax {
	private owlsyntax() {
		// No javadoc
	}

	static final String NL = System.getProperty("line.separator", "\n");

	private static ArgDecl quietDecl = new ArgDecl(false, "-q", "--quiet");

	private static ArgDecl helpDecl = new ArgDecl(false, "-h", "--help");

	private static ArgDecl liteDecl = new ArgDecl(false, "-l", "--lite");

	private static ArgDecl dlDecl = new ArgDecl(false, "-d", "--dl");

	private static ArgDecl bigDecl = new ArgDecl(false, "-b", "--big");

	private static ArgDecl langDecl = new ArgDecl(true, "-L", "--lang");

	private static ArgDecl dmDecl = new ArgDecl(true, "-m", "--manager");

	private static ArgDecl shortDecl = new ArgDecl(false, "-s", "--short");

	private static ArgDecl textUIDecl = new ArgDecl(false, "--textui");

	private static ArgDecl testDecl = new ArgDecl(false, "--test");

	private static String usageMessage = "    "
			+ owlsyntax.class.getName()
			+ " [--lite|--quiet|--dl] [--big|--lang [N-TRIPLE|N3]] [file1] [file2]"
			+ NL
			+ "    "
			+ owlsyntax.class.getName()
			+ " --help"
			+ NL
			+ "    "
			+ owlsyntax.class.getName()
			+ " [--textui] --test [ManifestURL]"
			+ NL
			+ NL
			+ "The first form reports \"Lite\", \"DL\", or \"Full\""
			+ NL
			+ "If two files are specified, then both files are checked, and"
			+ NL
			+ "the vocabulary usage by both files together must be separated."
			+ NL
			+ "If no files are specified then standard input is used,"
			+ NL
			+ "(in this case, relative URIs and rdf:ID's are resolved"
			+ NL
			+ " against <urn:x-jena:syntaxchecker>)."
			+ NL
			+ NL
			+ "  -l --lite     Give error messages for OWL DL or OWL Full constructions."
			+ "  -d --dl       Give error messages for OWL Full constructions (default)."
			+ NL
			+ "  -q --quiet    No error messages."
			+ NL
			+ "  -s --short    Give short error messages"
			+ NL
			+ "                (Default is long messages for OWL Full only)"
			+ NL
			+ "  -b --big      Input file is big - optimize memory usage."
			+ NL
			+ "                Quality of long error messages suffers."
			+ NL
			+ NL
			+ "  -L --lang     Specify N3 or N-TRIPLE input."
			+ NL
			+ NL

			+ "  -m --manager  Specify OWL Document Manager."
			+ NL<commit_msg>Added NL in usage message.<commit_after>/*
 * (c) Copyright 2002, 2003, 2004 Hewlett-Packard Development Company, LP
 * [See end of file]
 */

package jena;

import jena.cmdline.*;

import java.util.*;
import com.hp.hpl.jena.ontology.tidy.test.WGTests;
import com.hp.hpl.jena.ontology.tidy.*;
import com.hp.hpl.jena.ontology.OntDocumentManager;
import com.hp.hpl.jena.ontology.OntModel;
import com.hp.hpl.jena.ontology.OntModelSpec;
import com.hp.hpl.jena.ontology.ProfileRegistry;
import com.hp.hpl.jena.shared.*;
import com.hp.hpl.jena.rdf.model.*;

import java.io.*;

/**
 * Implements the OWL Syntax Checker from the OWL Test Cases. Current known
 * weaknesses:
 * <ul>
 * <li>Does not report "Other" for non-RDF/XML files</li>
 * <li>Network error reporting on bad owl:imports has not been tested.</li>
 * </ul>
 * When two files are given on the command-line it treats the first as a
 * premises file and the second as a conclusion file and indicates the sort of
 * OWL reasoner that may be needed for testing the entailment. For example, if
 * both files are Lite but a URI is used as an individual in the first and a
 * class in the second then a Full reasoner is needed.
 * 
 * @author <NAME>
 * @version $Id: owlsyntax.java,v 1.6 2004-12-14 13:31:10 jeremy_carroll Exp $
 */
public class owlsyntax {
	private owlsyntax() {
		// No javadoc
	}

	static final String NL = System.getProperty("line.separator", "\n");

	private static ArgDecl quietDecl = new ArgDecl(false, "-q", "--quiet");

	private static ArgDecl helpDecl = new ArgDecl(false, "-h", "--help");

	private static ArgDecl liteDecl = new ArgDecl(false, "-l", "--lite");

	private static ArgDecl dlDecl = new ArgDecl(false, "-d", "--dl");

	private static ArgDecl bigDecl = new ArgDecl(false, "-b", "--big");

	private static ArgDecl langDecl = new ArgDecl(true, "-L", "--lang");

	private static ArgDecl dmDecl = new ArgDecl(true, "-m", "--manager");

	private static ArgDecl shortDecl = new ArgDecl(false, "-s", "--short");

	private static ArgDecl textUIDecl = new ArgDecl(false, "--textui");

	private static ArgDecl testDecl = new ArgDecl(false, "--test");

	private static String usageMessage = "    "
			+ owlsyntax.class.getName()
			+ " [--lite|--quiet|--dl] [--big|--lang [N-TRIPLE|N3]] [file1] [file2]"
			+ NL
			+ "    "
			+ owlsyntax.class.getName()
			+ " --help"
			+ NL
			+ "    "
			+ owlsyntax.class.getName()
			+ " [--textui] --test [ManifestURL]"
			+ NL
			+ NL
			+ "The first form reports \"Lite\", \"DL\", or \"Full\""
			+ NL
			+ "If two files are specified, then both files are checked, and"
			+ NL
			+ "the vocabulary usage by both files together must be separated."
			+ NL
			+ "If no files are specified then standard input is used,"
			+ NL
			+ "(in this case, relative URIs and rdf:ID's are resolved"
			+ NL
			+ " against <urn:x-jena:syntaxchecker>)."
			+ NL
			+ NL
			+ "  -l --lite     Give error messages for OWL DL or OWL Full constructions."
			+ NL
			+ "  -d --dl       Give error messages for OWL Full constructions (default)."
			+ NL
			+ "  -q --quiet    No error messages."
			+ NL
			+ "  -s --short    Give short error messages"
			+ NL
			+ "                (Default is long messages for OWL Full only)"
			+ NL
			+ "  -b --big      Input file is big - optimize memory usage."
			+ NL
			+ "                Quality of long error messages suffers."
			+ NL
			+ NL
			+ "  -L --lang     Specify N3 or N-TRIPLE input."
			+ NL
			+ NL

			+ "  -m --manager  Specify OWL Document Manager."
			+ NL
{'fraction_non_alphanumeric': 0.13775437597836915, 'fraction_numerical': 0.009107727337412837, 'mean_word_length': 2.817490494296578, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1038362', 'n_tokens_mistral': 2625, 'n_tokens_neox': 2318, 'n_words': 794}