Commit caf44e6f authored by Bernd Kiefer's avatar Bernd Kiefer
Browse files

Switch to forschungssoftware, and do proper equivRed on adding tuples

parent ff5e8be3
......@@ -248,7 +248,7 @@
unless="maven.mode.offline">
<mkdir dir="${maven.repo.local}"/>
<mkdir dir="${maven.repo.local}/org/apache/xmlrpc/xmlrpc-client/3.1.3"/>
<get src="http://www.bsnsoft.de/nexus/content/groups/public//org/apache/xmlrpc/xmlrpc-client/3.1.3/xmlrpc-client-3.1.3.jar"
<get src="http://www.forschungssoftware.de/nexus/content/groups/public//org/apache/xmlrpc/xmlrpc-client/3.1.3/xmlrpc-client-3.1.3.jar"
dest="${maven.repo.local}/org/apache/xmlrpc/xmlrpc-client/3.1.3/xmlrpc-client-3.1.3.jar"
usetimestamp="false"
ignoreerrors="true"/>
......@@ -257,7 +257,7 @@
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/apache/xmlrpc/xmlrpc-common/3.1.3"/>
<get src="http://www.bsnsoft.de/nexus/content/groups/public//org/apache/xmlrpc/xmlrpc-common/3.1.3/xmlrpc-common-3.1.3.jar"
<get src="http://www.forschungssoftware.de/nexus/content/groups/public//org/apache/xmlrpc/xmlrpc-common/3.1.3/xmlrpc-common-3.1.3.jar"
dest="${maven.repo.local}/org/apache/xmlrpc/xmlrpc-common/3.1.3/xmlrpc-common-3.1.3.jar"
usetimestamp="false"
ignoreerrors="true"/>
......@@ -266,7 +266,7 @@
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/apache/ws/commons/util/ws-commons-util/1.0.2"/>
<get src="http://www.bsnsoft.de/nexus/content/groups/public//org/apache/ws/commons/util/ws-commons-util/1.0.2/ws-commons-util-1.0.2.jar"
<get src="http://www.forschungssoftware.de/nexus/content/groups/public//org/apache/ws/commons/util/ws-commons-util/1.0.2/ws-commons-util-1.0.2.jar"
dest="${maven.repo.local}/org/apache/ws/commons/util/ws-commons-util/1.0.2/ws-commons-util-1.0.2.jar"
usetimestamp="false"
ignoreerrors="true"/>
......@@ -275,7 +275,7 @@
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/xml-apis/xml-apis/1.0.b2"/>
<get src="http://www.bsnsoft.de/nexus/content/groups/public//xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"
<get src="http://www.forschungssoftware.de/nexus/content/groups/public//xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"
dest="${maven.repo.local}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"
usetimestamp="false"
ignoreerrors="true"/>
......@@ -284,7 +284,7 @@
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/apache/xmlrpc/xmlrpc-server/3.1.3"/>
<get src="http://www.bsnsoft.de/nexus/content/groups/public//org/apache/xmlrpc/xmlrpc-server/3.1.3/xmlrpc-server-3.1.3.jar"
<get src="http://www.forschungssoftware.de/nexus/content/groups/public//org/apache/xmlrpc/xmlrpc-server/3.1.3/xmlrpc-server-3.1.3.jar"
dest="${maven.repo.local}/org/apache/xmlrpc/xmlrpc-server/3.1.3/xmlrpc-server-3.1.3.jar"
usetimestamp="false"
ignoreerrors="true"/>
......@@ -293,7 +293,7 @@
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/commons-logging/commons-logging/1.0.2"/>
<get src="http://www.bsnsoft.de/nexus/content/groups/public//commons-logging/commons-logging/1.0.2/commons-logging-1.0.2.jar"
<get src="http://www.forschungssoftware.de/nexus/content/groups/public//commons-logging/commons-logging/1.0.2/commons-logging-1.0.2.jar"
dest="${maven.repo.local}/commons-logging/commons-logging/1.0.2/commons-logging-1.0.2.jar"
usetimestamp="false"
ignoreerrors="true"/>
......@@ -302,7 +302,7 @@
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/jline/jline/0.9.5"/>
<get src="http://www.bsnsoft.de/nexus/content/groups/public//jline/jline/0.9.5/jline-0.9.5.jar"
<get src="http://www.forschungssoftware.de/nexus/content/groups/public//jline/jline/0.9.5/jline-0.9.5.jar"
dest="${maven.repo.local}/jline/jline/0.9.5/jline-0.9.5.jar"
usetimestamp="false"
ignoreerrors="true"/>
......@@ -311,7 +311,7 @@
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/net/sf/trove4j/trove4j/3.0.3"/>
<get src="http://www.bsnsoft.de/nexus/content/groups/public//net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar"
<get src="http://www.forschungssoftware.de/nexus/content/groups/public//net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar"
dest="${maven.repo.local}/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar"
usetimestamp="false"
ignoreerrors="true"/>
......@@ -320,7 +320,7 @@
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/junit/junit/4.12"/>
<get src="http://www.bsnsoft.de/nexus/content/groups/public//junit/junit/4.12/junit-4.12.jar"
<get src="http://www.forschungssoftware.de/nexus/content/groups/public//junit/junit/4.12/junit-4.12.jar"
dest="${maven.repo.local}/junit/junit/4.12/junit-4.12.jar"
usetimestamp="false"
ignoreerrors="true"/>
......@@ -329,7 +329,7 @@
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/hamcrest/hamcrest-core/1.3"/>
<get src="http://www.bsnsoft.de/nexus/content/groups/public//org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
<get src="http://www.forschungssoftware.de/nexus/content/groups/public//org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
dest="${maven.repo.local}/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
usetimestamp="false"
ignoreerrors="true"/>
......
......@@ -144,23 +144,23 @@
<repositories>
<repository>
<id>BSNSOFT</id>
<name>BSNSOFT</name>
<url>http://www.bsnsoft.de/nexus/content/groups/public/</url>
<id>FORSCHUNGSSOFTWARE</id>
<name>FORSCHUNGSSOFTWARE</name>
<url>http://www.forschungssoftware.de/nexus/content/groups/public/</url>
</repository>
</repositories>
<distributionManagement>
<snapshotRepository>
<id>BSNSOFT</id>
<name>BSNSOFT</name>
<url>http://www.bsnsoft.de/nexus/content/repositories/snapshots/</url>
<id>FORSCHUNGSSOFTWARE</id>
<name>FORSCHUNGSSOFTWARE</name>
<url>http://www.forschungssoftware.de/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>BSNSOFT</id>
<name>BSNSOFT</name>
<url>http://www.bsnsoft.de/nexus/content/repositories/releases/</url>
<id>FORSCHUNGSSOFTWARE</id>
<name>FORSCHUNGSSOFTWARE</name>
<url>http://www.forschungssoftware.de/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
</project>
......@@ -141,6 +141,9 @@ public class Hfc {
_tupleStore.verbose = this.verbose;
_tupleStore.rdfCheck = this.rdfCheck;
_tupleStore.equivalenceClassReduction = this.equivalenceClassReduction;
if (_tupleStore.equivalenceClassReduction) {
_forwardChainer.cleanUpRepository = true;
}
_tupleStore.minNoOfArgs = this.minNoOfArgs;
_tupleStore.maxNoOfArgs = this.maxNoOfArgs;
_tupleStore.subjectPosition = this.subjectPosition;
......@@ -224,8 +227,17 @@ public class Hfc {
return s;
}
private int getSymbolId(String symbol) {
int id = _tupleStore.putObject(myNormalizeNamespaces(symbol));
if (_tupleStore.equivalenceClassReduction) {
id = _tupleStore.getProxy(id);
}
return id;
}
/** Normalize namespaces, and get ids directly to put in the tuples without
* using the hfc internal functions
* using the hfc internal functions. Also, honor the equivalence reduction
* by always entering the representative.
*
* @param rows the table that contains the tuples to add to the storage
* @param front the potentially-empty (== null) front element
......@@ -238,11 +250,11 @@ public class Hfc {
// normalize namespaces for front and backs
int frontId = -1; // Java wants an initial value
if (front != null)
frontId = _tupleStore.putObject(myNormalizeNamespaces(front));
frontId = getSymbolId(front);
int[] backIds = new int[backs.length];
if (backs.length != 0) {
for (int i = 0; i < backs.length; ++i)
backIds[i] = _tupleStore.putObject(myNormalizeNamespaces(backs[i]));
backIds[i] = getSymbolId(backs[i]);
}
// (front == null) means _no_ front element
final int frontLength = (front == null) ? 0 : 1;
......@@ -262,7 +274,7 @@ public class Hfc {
}
// table row
for (String s : row) {
tuple[i++] = _tupleStore.putObject(myNormalizeNamespaces(s));
tuple[i++] = getSymbolId(s);
}
// back elements
if (backs.length != 0) {
......@@ -322,7 +334,10 @@ public class Hfc {
public void computeClosure() {
if (null != _forwardChainer) {
_forwardChainer.cleanUpRepository = true;
_forwardChainer.computeClosure();
} else {
_tupleStore.cleanUpTupleStore();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment