1
2
3
4
5 package org.openrdf.elmo.smusher;
6
7 import org.openrdf.model.URI;
8 import org.slf4j.Logger;
9 import org.slf4j.LoggerFactory;
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 public class TransitivitySmusher extends FixedQuerySmusher {
25
26
27 private final static String TRANSITIVITY_QUERY =
28 "SELECT DISTINCT res1, res3 FROM " +
29 "{res1} <###> {res2} <###> {res3} " +
30
31 "WHERE res1 != res3 AND res1 != res2 AND res2 != res3 ";
32
33 protected final static Logger _logger = LoggerFactory.getLogger(TransitivitySmusher.class);
34
35 protected URI _property = org.openrdf.model.vocabulary.OWL.SAMEAS;
36
37 public TransitivitySmusher() {
38 super(TRANSITIVITY_QUERY.replaceAll("###", org.openrdf.model.vocabulary.OWL.SAMEAS.toString()));
39
40 }
41
42 public TransitivitySmusher(URI property) {
43 super(TRANSITIVITY_QUERY.replaceAll("###", property.toString()));
44 _property = property;
45 }
46
47 }