diff options
| author | yujiao <yujiao.zhou@gmail.com> | 2015-05-25 22:07:14 -0700 |
|---|---|---|
| committer | yujiao <yujiao.zhou@gmail.com> | 2015-05-25 22:07:14 -0700 |
| commit | 4f98cb7df7f2921808d825cdcd82f95a0899640e (patch) | |
| tree | fad60a143e8f6a300c24900b53d9a32af2875e24 /src/uk/ac/ox/cs/pagoda/tracking/TrackingRuleEncoderWithGap.java | |
| parent | e02ad77cefc3005e36ae48fe47bf7914007f094a (diff) | |
| download | ACQuA-4f98cb7df7f2921808d825cdcd82f95a0899640e.tar.gz ACQuA-4f98cb7df7f2921808d825cdcd82f95a0899640e.zip | |
fixed a bug in the process of generating gap tuples, see test in
TestGapMappedToLower.java
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/tracking/TrackingRuleEncoderWithGap.java')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/tracking/TrackingRuleEncoderWithGap.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/tracking/TrackingRuleEncoderWithGap.java b/src/uk/ac/ox/cs/pagoda/tracking/TrackingRuleEncoderWithGap.java index 555f0af..99028ca 100644 --- a/src/uk/ac/ox/cs/pagoda/tracking/TrackingRuleEncoderWithGap.java +++ b/src/uk/ac/ox/cs/pagoda/tracking/TrackingRuleEncoderWithGap.java | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.tracking; | 1 | package uk.ac.ox.cs.pagoda.tracking; |
| 2 | 2 | ||
| 3 | import java.util.Collection; | 3 | import java.util.Collection; |
| 4 | import java.util.HashSet; | ||
| 4 | import java.util.LinkedList; | 5 | import java.util.LinkedList; |
| 5 | import java.util.Set; | 6 | import java.util.Set; |
| 6 | 7 | ||
| @@ -37,7 +38,8 @@ public class TrackingRuleEncoderWithGap extends TrackingRuleEncoder { | |||
| 37 | AtomicRole trackingSameAs = AtomicRole.create(Namespace.EQUALITY + "_tn"); | 38 | AtomicRole trackingSameAs = AtomicRole.create(Namespace.EQUALITY + "_tn"); |
| 38 | OWLOntology onto = program.getOntology(); | 39 | OWLOntology onto = program.getOntology(); |
| 39 | Atom[] headAtom = new Atom[] {Atom.create(trackingSameAs, X, X)}, bodyAtom; | 40 | Atom[] headAtom = new Atom[] {Atom.create(trackingSameAs, X, X)}, bodyAtom; |
| 40 | for (OWLClass cls: onto.getClassesInSignature(true)) { | 41 | for (OWLOntology o: onto.getImportsClosure()) |
| 42 | for (OWLClass cls: o.getClassesInSignature()) { | ||
| 41 | String clsIRI = cls.getIRI().toString(); | 43 | String clsIRI = cls.getIRI().toString(); |
| 42 | unaryPredicates.add(clsIRI); | 44 | unaryPredicates.add(clsIRI); |
| 43 | bodyAtom = new Atom[] { | 45 | bodyAtom = new Atom[] { |
| @@ -47,7 +49,10 @@ public class TrackingRuleEncoderWithGap extends TrackingRuleEncoder { | |||
| 47 | } | 49 | } |
| 48 | 50 | ||
| 49 | Variable Y = Variable.create("Y"); | 51 | Variable Y = Variable.create("Y"); |
| 50 | Set<OWLObjectProperty> setOfProperties = onto.getObjectPropertiesInSignature(true); | 52 | Set<OWLObjectProperty> setOfProperties = new HashSet<OWLObjectProperty>(); |
| 53 | for (OWLOntology o: onto.getImportsClosure()) | ||
| 54 | for (OWLObjectProperty prop: o.getObjectPropertiesInSignature()) | ||
| 55 | setOfProperties.add(prop); | ||
| 51 | setOfProperties.add(onto.getOWLOntologyManager().getOWLDataFactory().getOWLObjectProperty(IRI.create(Namespace.INEQUALITY))); | 56 | setOfProperties.add(onto.getOWLOntologyManager().getOWLDataFactory().getOWLObjectProperty(IRI.create(Namespace.INEQUALITY))); |
| 52 | for (OWLObjectProperty prop: setOfProperties) { | 57 | for (OWLObjectProperty prop: setOfProperties) { |
| 53 | String propIRI = prop.getIRI().toString(); | 58 | String propIRI = prop.getIRI().toString(); |
