<commit_before>/**
 * Licensed 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.
 */
package com.github.commonsrdf.api;

/**
 * Factory for creating RDFTerm and Graph instances.
 * <p>
 * If an implementation does not support a particular method (e.g. because it
 * needs more parameters), then it may throw UnsupportedOperationException.
 * 
 * @see RDFTerm
 * @see Graph
 * 
 */
public interface RDFTermFactory {
	public BlankNode createBlankNode() throws UnsupportedOperationException;

	public BlankNode createBlankNode(String identifier)
			throws UnsupportedOperationException;

	public Graph createGraph() throws UnsupportedOperationException;

	public IRI createIRI(String iri) throws UnsupportedOperationException;

	public Literal createLiteral(String literal)
			throws UnsupportedOperationException;

	public Literal createLiteral(String literal, IRI dataType)
			throws UnsupportedOperationException;

	public Literal createLiteral(String literal, String language)
			throws UnsupportedOperationException;

	public Triple createTriple(BlankNodeOrIRI subject, IRI predicate,
			RDFTerm object) throws UnsupportedOperationException;

}<commit_msg>Hint at use of IllegalArgumentException<commit_after>/**
 * Licensed 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.
 */
package com.github.commonsrdf.api;

/**
 * Factory for creating RDFTerm and Graph instances.
 * <p>
 * If an implementation does not support a particular method (e.g. because it
 * needs more parameters), then it MAY throw UnsupportedOperationException.
 * <p>
 * If a factory method does not allow a provided parameter, e.g. because an IRI
 * is invalid, then it SHOULD throw IllegalArgumentException.
 * 
 * 
 * @see RDFTerm
 * @see Graph
 * 
 */
public interface RDFTermFactory {
	public BlankNode createBlankNode() throws UnsupportedOperationException;

	public BlankNode createBlankNode(String identifier)
			throws UnsupportedOperationException;

	public Graph createGraph() throws UnsupportedOperationException;

	public IRI createIRI(String iri) throws UnsupportedOperationException,
			IllegalArgumentException;

	public Literal createLiteral(String literal)
			throws UnsupportedOperationException;

	public Literal createLiteral(String literal, IRI dataType)
			throws UnsupportedOperationException, IllegalArgumentException;

	public Literal createLiteral(String literal, String language)
			throws UnsupportedOperationException, IllegalArgumentException;

	public Triple createTriple(BlankNodeOrIRI subject, IRI predicate,
			RDFTerm object) throws UnsupportedOperationException;

}
{'fraction_non_alphanumeric': 0.060640089837170126, 'fraction_numerical': 0.0022459292532285235, 'mean_word_length': 4.988235294117647, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '1085664', 'n_tokens_mistral': 922, 'n_tokens_neox': 859, 'n_words': 369}