Author: rwesten
Date: Thu May 17 11:15:18 2012
New Revision: 1339551

URL: http://svn.apache.org/viewvc?rev=1339551&view=rev
Log:
Contenthub now uses IndexedMGraph instead of SimpleMGraph

Modified:
    
incubator/stanbol/trunk/contenthub/store/clerezza/src/main/java/org/apache/stanbol/contenthub/store/clerezza/ClerezzaStore.java
    
incubator/stanbol/trunk/contenthub/store/inmemory/src/main/java/org/apache/stanbol/contenthub/store/inmemory/InMemoryStore.java
    
incubator/stanbol/trunk/contenthub/store/solr/src/main/java/org/apache/stanbol/contenthub/store/solr/SolrContentItemImpl.java
    
incubator/stanbol/trunk/contenthub/store/solr/src/main/java/org/apache/stanbol/contenthub/store/solr/SolrStoreImpl.java

Modified: 
incubator/stanbol/trunk/contenthub/store/clerezza/src/main/java/org/apache/stanbol/contenthub/store/clerezza/ClerezzaStore.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/store/clerezza/src/main/java/org/apache/stanbol/contenthub/store/clerezza/ClerezzaStore.java?rev=1339551&r1=1339550&r2=1339551&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/store/clerezza/src/main/java/org/apache/stanbol/contenthub/store/clerezza/ClerezzaStore.java
 (original)
+++ 
incubator/stanbol/trunk/contenthub/store/clerezza/src/main/java/org/apache/stanbol/contenthub/store/clerezza/ClerezzaStore.java
 Thu May 17 11:15:18 2012
@@ -30,6 +30,7 @@ import org.apache.clerezza.rdf.utils.Gra
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
+import org.apache.stanbol.commons.indexedgraph.IndexedMGraph;
 import org.apache.stanbol.contenthub.servicesapi.store.Store;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
 
@@ -68,7 +69,7 @@ public class ClerezzaStore implements St
         }
         handler.put(new UriRef(id), MediaType.valueOf(contentType), content);
         ContentItem contentItem = new ClerezzaContentItem(new GraphNode(uriRef,
-                cgProvider.getContentGraph()), new 
SimpleMGraph(metadataGraph), handler);
+                cgProvider.getContentGraph()), new 
IndexedMGraph(metadataGraph), handler);
         return contentItem;
     }
 

Modified: 
incubator/stanbol/trunk/contenthub/store/inmemory/src/main/java/org/apache/stanbol/contenthub/store/inmemory/InMemoryStore.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/store/inmemory/src/main/java/org/apache/stanbol/contenthub/store/inmemory/InMemoryStore.java?rev=1339551&r1=1339550&r2=1339551&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/store/inmemory/src/main/java/org/apache/stanbol/contenthub/store/inmemory/InMemoryStore.java
 (original)
+++ 
incubator/stanbol/trunk/contenthub/store/inmemory/src/main/java/org/apache/stanbol/contenthub/store/inmemory/InMemoryStore.java
 Thu May 17 11:15:18 2012
@@ -31,6 +31,7 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
+import org.apache.stanbol.commons.indexedgraph.IndexedMGraph;
 import org.apache.stanbol.contenthub.servicesapi.store.Store;
 import 
org.apache.stanbol.enhancer.contentitem.inmemory.InMemoryContentItemFactory;
 import org.apache.stanbol.enhancer.servicesapi.ContentItem;
@@ -68,7 +69,7 @@ public class InMemoryStore implements St
                 : new UriRef(id);
         log.debug("create ContentItem for id " + uri + " on TC Manager= "
                 + tcProvider);
-        final MGraph g = new SimpleMGraph();
+        final MGraph g = new IndexedMGraph();
         try {
             return ciFactory.createContentItem(uri, new 
ByteArraySource(content, mimeType), g);
         } catch (IOException e) {

Modified: 
incubator/stanbol/trunk/contenthub/store/solr/src/main/java/org/apache/stanbol/contenthub/store/solr/SolrContentItemImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/store/solr/src/main/java/org/apache/stanbol/contenthub/store/solr/SolrContentItemImpl.java?rev=1339551&r1=1339550&r2=1339551&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/store/solr/src/main/java/org/apache/stanbol/contenthub/store/solr/SolrContentItemImpl.java
 (original)
+++ 
incubator/stanbol/trunk/contenthub/store/solr/src/main/java/org/apache/stanbol/contenthub/store/solr/SolrContentItemImpl.java
 Thu May 17 11:15:18 2012
@@ -26,6 +26,7 @@ import java.util.Map;
 import org.apache.clerezza.rdf.core.MGraph;
 import org.apache.clerezza.rdf.core.UriRef;
 import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.stanbol.commons.indexedgraph.IndexedMGraph;
 import org.apache.stanbol.contenthub.servicesapi.store.solr.SolrContentItem;
 import org.apache.stanbol.contenthub.store.solr.util.ContentItemIDOrganizer;
 import org.apache.stanbol.enhancer.contentitem.inmemory.InMemoryBlob;
@@ -78,10 +79,10 @@ public class SolrContentItemImpl extends
                 //using this deprecated constructor is OK as a major change to
                 //this component is done in an other branch (STANBOL-471) 
                 new InMemoryBlob(content, mimeType), 
-                metadata == null ? new SimpleMGraph() : metadata);
+                metadata == null ? new IndexedMGraph() : metadata);
 
         if (metadata == null) {
-            metadata = new SimpleMGraph();
+            metadata = new IndexedMGraph();
         }
         if (constraints == null) {
             constraints = new HashMap<String,List<Object>>();

Modified: 
incubator/stanbol/trunk/contenthub/store/solr/src/main/java/org/apache/stanbol/contenthub/store/solr/SolrStoreImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/contenthub/store/solr/src/main/java/org/apache/stanbol/contenthub/store/solr/SolrStoreImpl.java?rev=1339551&r1=1339550&r2=1339551&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/contenthub/store/solr/src/main/java/org/apache/stanbol/contenthub/store/solr/SolrStoreImpl.java
 (original)
+++ 
incubator/stanbol/trunk/contenthub/store/solr/src/main/java/org/apache/stanbol/contenthub/store/solr/SolrStoreImpl.java
 Thu May 17 11:15:18 2012
@@ -62,6 +62,7 @@ import org.apache.solr.client.solrj.resp
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.SolrInputDocument;
+import org.apache.stanbol.commons.indexedgraph.IndexedMGraph;
 import org.apache.stanbol.commons.solr.managed.ManagedSolrServer;
 import org.apache.stanbol.contenthub.servicesapi.Constants;
 import org.apache.stanbol.contenthub.servicesapi.ldpath.LDPathException;
@@ -171,7 +172,7 @@ public class SolrStoreImpl implements So
             uri = new UriRef(ContentItemIDOrganizer.attachBaseURI(id));
         }
         log.debug("Created ContentItem with id:{} and uri:{}", id, uri);
-        final MGraph g = new SimpleMGraph();
+        final MGraph g = new IndexedMGraph();
         return new SolrContentItemImpl(uri.getUnicodeString(), title, content, 
contentType, g, constraints);
     }
 
@@ -556,7 +557,7 @@ public class SolrStoreImpl implements So
         }
 
         ResultSet resultSet = tcManager.executeSparqlQuery(selectQuery, 
this.getEnhancementGraph());
-        MGraph metadata = new SimpleMGraph();
+        MGraph metadata = new IndexedMGraph();
         while (resultSet.hasNext()) {
             SolutionMapping mapping = resultSet.next();
             UriRef ref = (UriRef) mapping.get("enhID");


Reply via email to