1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package com.ontotext.ordi.trree;
19
20 import java.util.Set;
21
22 import org.openrdf.model.Resource;
23 import org.openrdf.model.URI;
24 import org.openrdf.model.Value;
25
26 import com.ontotext.ordi.tripleset.TFactory;
27 import com.ontotext.ordi.tripleset.TStatement;
28 import com.ontotext.ordi.tripleset.impl.TFactoryImpl;
29 import com.ontotext.ordi.tripleset.impl.TStatementImpl;
30 import com.ontotext.trree.owlim_ext.AbstractRepository;
31 import com.ontotext.trree.owlim_ext.EntityPool;
32
33 public class TRREEValueFactory extends TFactoryImpl implements TFactory {
34
35 protected final AbstractRepository repository;
36
37 protected final EntityPool pool;
38
39 public TRREEValueFactory(AbstractRepository repository, EntityPool pool) {
40 if (repository == null || pool == null) {
41 throw new IllegalArgumentException();
42 }
43 this.repository = repository;
44 this.pool = pool;
45 }
46
47 public TStatement createStatement(Resource subject, URI predicate,
48 Value object, Resource context, URI... ts) {
49 return new TStatementImpl(subject, predicate, object, context, ts);
50 }
51
52 public TStatement createStatement(Resource subject, URI predicate,
53 Value object, Resource context, Set<URI> ts) {
54 return new TStatementImpl(subject, predicate, object, context, ts);
55 }
56 }