Debian Codegraph @

commons-rdf-simple/src/main/java/org/apache/commons/rdf/simple/SimpleRDFTermFactory.java

raw
1 /**
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18 package org.apache.commons.rdf.simple;
19
20 import org.apache.commons.rdf.api.BlankNode;
21 import org.apache.commons.rdf.api.BlankNodeOrIRI;
22 import org.apache.commons.rdf.api.Graph;
23 import org.apache.commons.rdf.api.IRI;
24 import org.apache.commons.rdf.api.Literal;
25 import org.apache.commons.rdf.api.RDFTerm;
26 import org.apache.commons.rdf.api.RDFTermFactory;
27 import org.apache.commons.rdf.api.Triple;
28
29 /**
30 * A Simple implementation of {@link RDFTermFactory}
31 * <p>
32 * This class is <strong>deprecated</strong>, use instead {@link SimpleRDF}.
33 */
34 @Deprecated
35 public class SimpleRDFTermFactory implements RDFTermFactory {
36
37 private final SimpleRDF factory = new SimpleRDF();
38
39 @Override
40 public BlankNode createBlankNode() {
41 return factory.createBlankNode();
42 }
43
44 @Override
45 public BlankNode createBlankNode(final String name) {
46 return factory.createBlankNode(name);
47 }
48
49 @Override
50 public Graph createGraph() {
51 return factory.createGraph();
52 }
53
54 @Override
55 public IRI createIRI(final String iri) {
56 return factory.createIRI(iri);
57 }
58
59 @Override
60 public Literal createLiteral(final String literal) {
61 return factory.createLiteral(literal);
62 }
63
64 @Override
65 public Literal createLiteral(final String literal, final IRI dataType) {
66 return factory.createLiteral(literal, dataType);
67 }
68
69 @Override
70 public Literal createLiteral(final String literal, final String language) {
71 return factory.createLiteral(literal, language);
72 }
73
74 @Override
75 public Triple createTriple(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
76 return factory.createTriple(subject, predicate, object);
77 }
78 }