You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by re...@apache.org on 2010/08/16 19:57:19 UTC
svn commit: r986077 - in
/incubator/clerezza/trunk/org.apache.clerezza.parent:
org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/
org.apache.clerezza.platform.conte...
Author: reto
Date: Mon Aug 16 17:57:19 2010
New Revision: 986077
URL: http://svn.apache.org/viewvc?rev=986077&view=rev
Log:
CLEREZZA-275: ContentGraphProvider now returns LockableMGraph
Modified:
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.content/src/test/java/org/apache/clerezza/platform/content/hierarchy/HierarchyTest.java
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
Modified: incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java?rev=986077&r1=986076&r2=986077&view=diff
==============================================================================
--- incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java (original)
+++ incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java Mon Aug 16 17:57:19 2010
@@ -25,6 +25,8 @@ import org.apache.clerezza.platform.conc
import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
import org.apache.clerezza.rdf.core.Graph;
import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.rdf.core.access.LockableMGraphWrapper;
import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
import org.junit.Assert;
import org.junit.Before;
@@ -53,7 +55,7 @@ public class ConceptProviderManagerTest
}
}
- private static MGraph mGraph = new SimpleMGraph();
+ private static LockableMGraph mGraph = new LockableMGraphWrapper(new SimpleMGraph());
private TestedConceptProviderManager testedConceptProviderManager;
@@ -63,7 +65,7 @@ public class ConceptProviderManagerTest
testedConceptProviderManager.cgProvider = new ContentGraphProvider() {
@Override
- public MGraph getContentGraph() {
+ public LockableMGraph getContentGraph() {
return mGraph;
}
};
Modified: incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java?rev=986077&r1=986076&r2=986077&view=diff
==============================================================================
--- incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java (original)
+++ incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.concepts/org.apache.clerezza.platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java Mon Aug 16 17:57:19 2010
@@ -26,6 +26,8 @@ import org.apache.clerezza.platform.grap
import org.apache.clerezza.rdf.core.Graph;
import org.apache.clerezza.rdf.core.MGraph;
import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.rdf.core.access.LockableMGraphWrapper;
import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
import org.apache.clerezza.rdf.core.impl.TripleImpl;
import org.apache.clerezza.rdf.ontologies.OWL;
@@ -94,7 +96,7 @@ public class ConceptsFinderTest {
private class TestedConceptsFinder extends ConceptsFinder {
}
- private static MGraph mGraph = new SimpleMGraph();
+ private static LockableMGraph mGraph = new LockableMGraphWrapper(new SimpleMGraph());
private TestedConceptProviderManager testedConceptProviderManager;
private TestedConceptsFinder testedConceptsFinder;
@@ -111,8 +113,8 @@ public class ConceptsFinderTest {
final ContentGraphProvider cgProvider = new ContentGraphProvider() {
@Override
- public MGraph getContentGraph() {
- return new SimpleMGraph();
+ public LockableMGraph getContentGraph() {
+ return new LockableMGraphWrapper(new SimpleMGraph());
}
};
@@ -120,7 +122,7 @@ public class ConceptsFinderTest {
testedConceptProviderManager = new TestedConceptProviderManager();
testedConceptProviderManager.cgProvider = new ContentGraphProvider() {
@Override
- public MGraph getContentGraph() {
+ public LockableMGraph getContentGraph() {
return mGraph;
}
};
@@ -149,4 +151,4 @@ public class ConceptsFinderTest {
Assert.assertFalse(proposals.hasProperty(QUERYRESULT.concept, concept2c));
Assert.assertFalse(proposals.hasProperty(QUERYRESULT.concept, concept2d));
}
-}
\ No newline at end of file
+}
Modified: incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.content/src/test/java/org/apache/clerezza/platform/content/hierarchy/HierarchyTest.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.content/src/test/java/org/apache/clerezza/platform/content/hierarchy/HierarchyTest.java?rev=986077&r1=986076&r2=986077&view=diff
==============================================================================
--- incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.content/src/test/java/org/apache/clerezza/platform/content/hierarchy/HierarchyTest.java (original)
+++ incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.content/src/test/java/org/apache/clerezza/platform/content/hierarchy/HierarchyTest.java Mon Aug 16 17:57:19 2010
@@ -296,9 +296,9 @@ public class HierarchyTest{
{
contentGraph.setCheckConcurrency(true);
}
- private MGraph graph = new LockableMGraphWrapperForTesting(contentGraph);
+ private LockableMGraph graph = new LockableMGraphWrapperForTesting(contentGraph);
@Override
- public MGraph getContentGraph() {
+ public LockableMGraph getContentGraph() {
return graph;
}
}
Modified: incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java?rev=986077&r1=986076&r2=986077&view=diff
==============================================================================
--- incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java (original)
+++ incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java Mon Aug 16 17:57:19 2010
@@ -19,7 +19,6 @@
package org.apache.clerezza.platform.graphprovider.content;
import java.util.Arrays;
-import java.util.Dictionary;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -29,6 +28,7 @@ import org.osgi.service.component.Compon
import org.apache.clerezza.rdf.core.MGraph;
import org.apache.clerezza.rdf.core.TripleCollection;
import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
import org.apache.clerezza.rdf.core.access.TcManager;
import org.apache.clerezza.rdf.utils.UnionMGraph;
@@ -91,7 +91,7 @@ public class ContentGraphProvider {
}
}
- public MGraph getContentGraph() {
+ public LockableMGraph getContentGraph() {
configLock.readLock().lock();
try {
TripleCollection[] united = new TripleCollection[additions.length + 1];