Modified: incubator/stanbol/trunk/entityhub/indexing/genericrdf/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/genericrdf/pom.xml?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/genericrdf/pom.xml (original)
+++ incubator/stanbol/trunk/entityhub/indexing/genericrdf/pom.xml Wed Nov 23 
09:01:33 2011
@@ -185,6 +185,11 @@
             <artifactId>org.apache.stanbol.commons.solr.core</artifactId>
             <scope>runtime</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.stanbol</groupId>
+            <artifactId>org.apache.stanbol.commons.solr.managed</artifactId>
+            <scope>runtime</scope>
+        </dependency>
                <dependency>
                        <!-- needed because the SolrYard uses 
ConfigurationExceptions -->
                        <groupId>org.osgi</groupId>
@@ -406,24 +411,25 @@
                                <artifactId>maven-assembly-plugin</artifactId>
                                <version>2.2</version>
                                <configuration>
-                                       <descriptors>
+                                       <descriptors>
                                                
<descriptor>src/main/assembly/assembly.xml</descriptor>
                                        </descriptors>
                                        <archive>
                                                <manifest>
+                                                   
<addClasspath>true</addClasspath>
                                                        
<mainClass>org.apache.stanbol.entityhub.indexing.Main</mainClass>
                                                </manifest>
                                        </archive>
                                </configuration>
-                               <executions>
+<!--                           <executions>
                                        <execution>
-                                               <id>make-assembly</id> <!-- 
this is used for inheritance merges -->
-                                               <phase>package</phase> <!-- 
bind to the packaging phase -->
+                                               <id>make-assembly</id>
+                                               <phase>package</phase>
                                                <goals>
-                                                       <!-- goal>single</goal 
-->
+                                                       <goal>single</goal>
                                                </goals>
                                        </execution>
-                               </executions>
+                               </executions>  -->
                        </plugin>
                </plugins>
        </build>

Modified: 
incubator/stanbol/trunk/entityhub/indexing/genericrdf/src/main/assembly/assembly.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/genericrdf/src/main/assembly/assembly.xml?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/entityhub/indexing/genericrdf/src/main/assembly/assembly.xml
 (original)
+++ 
incubator/stanbol/trunk/entityhub/indexing/genericrdf/src/main/assembly/assembly.xml
 Wed Nov 23 09:01:33 2011
@@ -28,6 +28,7 @@
       <unpackOptions>
         <excludes>
           <exclude>META-INF/maven/**</exclude>
+          <exclude>META-INF/services/</exclude>
           <exclude>log4j.properties</exclude>
         </excludes>
       </unpackOptions>

Modified: 
incubator/stanbol/trunk/entityhub/indexing/genericrdf/src/main/resources/indexing/config/indexing.properties
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/genericrdf/src/main/resources/indexing/config/indexing.properties?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/entityhub/indexing/genericrdf/src/main/resources/indexing/config/indexing.properties
 (original)
+++ 
incubator/stanbol/trunk/entityhub/indexing/genericrdf/src/main/resources/indexing/config/indexing.properties
 Wed Nov 23 09:01:33 2011
@@ -121,6 +121,16 @@ indexingDestination=org.apache.stanbol.e
 
 # Additional configurations for ReferencedSite
 
+# The "Synchronized" property is supported by some Entityhub Yard 
implementations
+# to automatically update/delete local data as soon as the created archive with
+# the indexed data is updated/deleted in the /datafiles folder of Apache 
Stanbol
+# By default this feature is activated. For very big indexes users might want 
to
+# disable this feature to allow the deletion of the archive after the index was
+# initialised successfully.
+# By default this feature is enabled. Uncommend the next line to deactivate it.
+#Synchronized=false
+
+
 # All the following properties are optional, but can be used to configure
 # the referenced site used to access the indexed data within the Entityhub
 

Modified: 
incubator/stanbol/trunk/entityhub/indexing/source/vcard/src/main/java/org/apache/stanbol/entityhub/indexing/source/vcard/VcardIndexingSource.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/source/vcard/src/main/java/org/apache/stanbol/entityhub/indexing/source/vcard/VcardIndexingSource.java?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/entityhub/indexing/source/vcard/src/main/java/org/apache/stanbol/entityhub/indexing/source/vcard/VcardIndexingSource.java
 (original)
+++ 
incubator/stanbol/trunk/entityhub/indexing/source/vcard/src/main/java/org/apache/stanbol/entityhub/indexing/source/vcard/VcardIndexingSource.java
 Wed Nov 23 09:01:33 2011
@@ -630,7 +630,7 @@ public class VcardIndexingSource impleme
                                     current = 
vf.createRepresentation(orgEntityId);
                                     initSubRepresentation(current, rep, 
mapping);
                                     representations.put(current.getId(), 
current);
-                                    current.add(orgNameMapping.uri, 
StringUtils.chomp(orgName).trim());
+                                    current.addNaturalText(orgNameMapping.uri, 
StringUtils.chomp(orgName).trim());
                                     //TODO: inverse relation form the ORG to 
the
                                     // Person can not be supported without 
caching
                                     // organisations. Therefore delete this 
relation for now

Modified: 
incubator/stanbol/trunk/entityhub/jersey/src/main/resources/org/apache/stanbol/entityhub/jersey/templates/org/apache/stanbol/entityhub/jersey/resource/ReferencedSiteRootResource/inc_find.ftl
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/jersey/src/main/resources/org/apache/stanbol/entityhub/jersey/templates/org/apache/stanbol/entityhub/jersey/resource/ReferencedSiteRootResource/inc_find.ftl?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/entityhub/jersey/src/main/resources/org/apache/stanbol/entityhub/jersey/templates/org/apache/stanbol/entityhub/jersey/resource/ReferencedSiteRootResource/inc_find.ftl
 (original)
+++ 
incubator/stanbol/trunk/entityhub/jersey/src/main/resources/org/apache/stanbol/entityhub/jersey/templates/org/apache/stanbol/entityhub/jersey/resource/ReferencedSiteRootResource/inc_find.ftl
 Wed Nov 23 09:01:33 2011
@@ -70,7 +70,7 @@ function startTestSearch() {
  var data = "name=" + $("#testSearchValue").val() + "&limit=10&offset=0";
  $.ajax({
    type: "POST",
-   url: "find",
+   url: window.location.href.replace(/\/$/, "") + "/find", //normalise 
trailing '/'
    data: data,
    dataType: "text",
    cache: false,

Modified: incubator/stanbol/trunk/entityhub/yard/solr/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/pom.xml?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/pom.xml (original)
+++ incubator/stanbol/trunk/entityhub/yard/solr/pom.xml Wed Nov 23 09:01:33 2011
@@ -100,6 +100,10 @@
       <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.commons.solr.core</artifactId>
     </dependency>
+    <dependency> <!-- provides managed Solr servers -->
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.solr.managed</artifactId>
+    </dependency>
 
     <!-- Stanbol Entityhub internal dependencies -->
     <dependency>

Modified: 
incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java
 (original)
+++ 
incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java
 Wed Nov 23 09:01:33 2011
@@ -38,7 +38,9 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.PropertyOption;
 import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.ReferencePolicy;
+import org.apache.felix.scr.annotations.ReferenceStrategy;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrRequest.METHOD;
@@ -51,7 +53,9 @@ import org.apache.solr.client.solrj.resp
 import org.apache.solr.client.solrj.response.SolrPingResponse;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrInputDocument;
-import org.apache.stanbol.commons.solr.SolrDirectoryManager;
+import org.apache.stanbol.commons.solr.managed.IndexMetadata;
+import org.apache.stanbol.commons.solr.managed.ManagedSolrServer;
+import org.apache.stanbol.commons.solr.IndexReference;
 import org.apache.stanbol.commons.solr.SolrServerProviderManager;
 import org.apache.stanbol.commons.solr.SolrServerTypeEnum;
 import org.apache.stanbol.commons.solr.utils.ConfigUtils;
@@ -78,6 +82,7 @@ import org.apache.stanbol.entityhub.yard
 import org.apache.stanbol.entityhub.yard.solr.query.IndexConstraintTypeEnum;
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.component.ComponentContext;
+import org.osgi.util.tracker.ServiceTracker;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -133,11 +138,7 @@ import org.slf4j.LoggerFactory;
          @Property(name = AbstractYard.MAX_QUERY_RESULT_NUMBER, intValue = -1),
          // BEGIN SolrYard specific Properties
          @Property(name = SolrYard.SOLR_SERVER_LOCATION),
-         @Property(name = SolrYard.MULTI_YARD_INDEX_LAYOUT, 
-             options = {
-                   @PropertyOption(name = "true", value = "true"),
-                   @PropertyOption(name = "false", value = "false")}, 
-                   boolValue = false),
+         @Property(name = SolrYard.MULTI_YARD_INDEX_LAYOUT,boolValue=false),
          @Property(name = SolrYard.MAX_BOOLEAN_CLAUSES, intValue = 
SolrYard.defaultMaxBooleanClauses)})
 public class SolrYard extends AbstractYard implements Yard {
     /**
@@ -287,20 +288,22 @@ public class SolrYard extends AbstractYa
      * commons http one for all other requests. This would provide performance 
advantages when updating
      * {@link Representation}s stored in a SolrYard using an remote SolrServer.
      */
-    @Reference(policy=ReferencePolicy.DYNAMIC,
+    @Reference(cardinality=ReferenceCardinality.MANDATORY_UNARY,
         bind="bindSolrServerProviderManager",
-        unbind="unbindSolrServerProviderManager")
+        unbind="unbindSolrServerProviderManager",
+        strategy=ReferenceStrategy.EVENT,
+        policy=ReferencePolicy.DYNAMIC)
     private SolrServerProviderManager solrServerProviderManager;
     /**
-     * Used to retrieve (and init if not already present) the Solr Index 
directory for relative paths parsed
-     * for {@link SolrYardConfig#getSolrServerLocation()}. Note that the 
{@link SolrDirectoryManager} only
-     * provides the path to the files. The {@link SolrServer} instance is 
created by the
-     * {@link SolrServerProviderManager}!
-     */
-    @Reference(policy=ReferencePolicy.DYNAMIC,
-        bind="bindSolrDirectoryManager",
-        unbind="unbindSolrDirectoryManager")
-    private SolrDirectoryManager solrDirectoryManager;
+     * Optionally a {@link ManagedSolrServer} that is used to create new 
+     * Solr indexes based on parsed configurations.
+     */
+    @Reference(cardinality=ReferenceCardinality.OPTIONAL_UNARY,
+        bind="bindManagedSolrServer",
+        unbind="unbindManagedSolrServer",
+        strategy=ReferenceStrategy.EVENT,
+        policy=ReferencePolicy.DYNAMIC)
+    private ManagedSolrServer managedSolrServer;
     /**
      * If update(..) and store(..) calls should be immediately committed.
      */
@@ -339,10 +342,10 @@ public class SolrYard extends AbstractYa
     public SolrYard(SolrYardConfig config) throws IllegalArgumentException, 
YardException {
         solrServerProviderManager = SolrServerProviderManager.getInstance();
         // init via java.util.ServiceLoader
-        Iterator<SolrDirectoryManager> providerIt = 
ServiceLoader.load(SolrDirectoryManager.class,
-            SolrDirectoryManager.class.getClassLoader()).iterator();
+        Iterator<ManagedSolrServer> providerIt = 
ServiceLoader.load(ManagedSolrServer.class,
+            ManagedSolrServer.class.getClassLoader()).iterator();
         if (providerIt.hasNext()) {
-            solrDirectoryManager = providerIt.next();
+            managedSolrServer = providerIt.next();
 //            if(config.getSolrServerType() == SolrServerTypeEnum.EMBEDDED){
 //                File location = 
ConfigUtils.toFile(config.getSolrServerLocation());
 //                if(!location.isAbsolute()){
@@ -352,7 +355,7 @@ public class SolrYard extends AbstractYa
 //            }
         } else {
             throw new IllegalStateException("Unable to instantiate "
-                                            + 
SolrDirectoryManager.class.getSimpleName()
+                                            + 
ManagedSolrServer.class.getSimpleName()
                                             + " service by using " + 
ServiceLoader.class.getName() + "!");
         }
         // we need to change the exceptions, because this will be called 
outside
@@ -374,12 +377,25 @@ public class SolrYard extends AbstractYa
     protected void unbindSolrServerProviderManager(SolrServerProviderManager 
manager){
         this.solrServerProviderManager = null;
     }
-    protected void bindSolrDirectoryManager(SolrDirectoryManager manager){
-        this.solrDirectoryManager = manager;
+    protected void bindManagedSolrServer(ManagedSolrServer manager){
+        SolrYardConfig config = (SolrYardConfig) this.getConfig();
+        log.info(" ... bind ManagedSolrServer '{}' to SolrYard '{}'",
+            manager.getServerName(),config != null ? config.getId() : "<not 
yet activated>");
+        this.managedSolrServer = manager;
+        if(config != null){ //if activated
+            try {
+                checkManagedSolrIndex(manager, config);
+            } catch (Exception e) {
+                log.error("Exception while checking SolrIndex '"+ 
config.getSolrServerLocation()
+                    +"' on ManagedSolrServer 
'"+manager.getServerName()+"'!",e);
+            }
+        }
     }
     
-    protected void unbindSolrDirectoryManager(SolrDirectoryManager manager){
-        this.solrDirectoryManager = null;
+    protected void unbindManagedSolrServer(ManagedSolrServer manager){
+        log.info(" ... unbind ManagedSolrServer '{}' from SolrYard '{}'",
+            manager.getServerName(),getConfig() != null ? getConfig().getId() 
: "<not yet activated>");
+        this.managedSolrServer = null;
     }
     /**
      * Builds an {@link SolrYardConfig} instance based on the parsed {@link 
ComponentContext} and forwards to
@@ -444,6 +460,18 @@ public class SolrYard extends AbstractYa
         this.indexValueFactory = IndexValueFactory.getInstance();
         this.documentBoostFieldName = config.getDocumentBoostFieldName();
         this.fieldBoostMap = config.getFieldBoosts();
+        //try to initialise the SolrServer
+        ManagedSolrServer managedSolrServer = this.managedSolrServer;
+        if(managedSolrServer != null){ 
+            //check also if we need to create/init an SolrServer on startup
+            try {
+                checkManagedSolrIndex(managedSolrServer, config);
+            } catch (Exception e) {
+                log.error("Exception while checking SolrIndex '"+ 
config.getSolrServerLocation()
+                    +"' on ManagedSolrServer 
'"+managedSolrServer.getServerName()+"'!",e);
+            }
+        }
+        log.info("Activated SolrYard {}",config.getId());
     }
 
     /**
@@ -480,58 +508,59 @@ public class SolrYard extends AbstractYa
     private void initSolrServer() throws YardException {
         SolrYardConfig config = (SolrYardConfig) this.getConfig();
         if (config.getSolrServerType() == SolrServerTypeEnum.EMBEDDED) {
-            File indexDirectory = 
ConfigUtils.toFile(config.getSolrServerLocation());
-            if (!indexDirectory.isAbsolute()) { // relative paths
-                if(solrDirectoryManager == null){
-                    throw new YardException(String.format(
-                        "Unable to init SolrServer because %s service is not 
present",
-                        SolrDirectoryManager.class.getSimpleName()));
-                }
-                File solrIndexLocation = null;
-                
if(!solrDirectoryManager.isManagedIndex(config.getSolrServerLocation())){
-                    // try to create a new index
-                    solrIndexLocation = createSolrIndex(config, 
config.getSolrServerLocation());
-                } else if(!withinOSGI){ //we need only the solrIndexLocation
-                    //when running outside an OSGI environment
-                    solrIndexLocation = 
solrDirectoryManager.getSolrIndexDirectory(config.getSolrServerLocation());
-                }
-                if(!withinOSGI){
-                    //in that case we need to replace the parse 
SolrServerLocation
-                    //with the absolute path to the managed Dir
-                    
config.setSolrServerLocation(solrIndexLocation.getAbsolutePath());
-                } // else (in OSGI Environment) the index will be found by 
using it's
-                //name (the relative path)
-            }
-        }
-        if(solrServerProviderManager == null){
-            throw new YardException(String.format(
-                "Unable to init SolrServer because %s service is not present",
-                SolrServerProviderManager.class.getSimpleName()));
+            //TODO: add support for the creation of indexes on 
ManagedSolrServers other than the
+            //      default server!
+            checkManagedSolrIndex(managedSolrServer,config);
         }
-        try {
-            _server = 
solrServerProviderManager.getSolrServer(config.getSolrServerType(), 
config.getSolrServerLocation());
-            // test the server
-            SolrPingResponse pingResponse = _server.ping();
-            log.info(String.format("Successful ping for SolrServer %s ( %d ms) 
Details: %s",
-                config.getSolrServerLocation(), pingResponse.getElapsedTime(), 
pingResponse));
-        } catch (IOException e) {
-            throw new YardException("Unable to ping created SolrServer 
"+config.getSolrServerLocation(),e);
-        } catch (SolrServerException e) {
-            throw new YardException("Unable to ping created SolrServer 
"+config.getSolrServerLocation(),e);
-        } catch (RuntimeException e) {
-            throw new YardException("Unable to init SolrServer 
"+config.getSolrServerLocation() +
-                "because of "+e.getMessage(),e);
+        SolrServerProviderManager provider = solrServerProviderManager;
+        if(provider != null){
+            try {
+                _server = provider.getSolrServer(config.getSolrServerType(), 
config.getSolrServerLocation());
+            } catch (RuntimeException e) {
+                throw new YardException("Unable to init SolrServer 
"+config.getSolrServerLocation() +
+                    "because of "+e.getMessage(),e);
+            }
+        } else {
+            throw new YardException("Unable to init SolrServer because the '"+
+                SolrServerProviderManager.class.getSimpleName()+"' service is 
currently not active!");
         }
     }
 
     /**
+     * @param config
+     * @param indexReference
+     * @throws YardException
+     */
+    private void checkManagedSolrIndex(ManagedSolrServer managedSolrServer, 
SolrYardConfig config) throws YardException {
+        if(managedSolrServer == null){
+            return; //no managed server available ... can not check
+        }
+        IndexReference indexReference = 
IndexReference.parse(config.getSolrServerLocation());
+        if(indexReference.isName() && managedSolrServer != null &&
+                (indexReference.getServer() == null || 
+                        
indexReference.getServer().equals(managedSolrServer.getServerName()))){
+            //config is a name and the server is the default server
+            // -> look if index is already managed and if not create!
+            if(!managedSolrServer.isManagedIndex(indexReference.getIndex())){
+                // try to create a new index
+                IndexReference createdIndexRef = 
createSolrIndex(managedSolrServer,config, indexReference.getIndex());
+                if(!withinOSGI){
+                    //in that case we need to replace the parse 
SolrServerLocation
+                    //with the name of the created solr index
+                    config.setSolrServerLocation(createdIndexRef.getIndex());
+                }
+            } //already managed -> nothing to do
+        } // absolute path or other server than the default server -> can not 
create!
+    }
+
+    /**
      * Creates a new SolrIndex based on this Yards configuration by using the
-     * {@link SolrDirectoryManager} service
+     * {@link ManagedSolrServer} service
      * @param config the configuration of this SolrYard
      * @param solrIndexLocation the name of the index to create
      * @throws YardException On any Exception while creating the index
      */
-    private File createSolrIndex(SolrYardConfig config, final String 
solrIndexLocation) throws YardException {
+    private IndexReference createSolrIndex(ManagedSolrServer managedServer, 
SolrYardConfig config, final String solrIndexLocation) throws YardException {
         String configName;
         if(config.isDefaultInitialisation()){
             configName = SolrYard.DEFAULT_SOLR_INDEX_CONFIGURATION_NAME;
@@ -541,17 +570,17 @@ public class SolrYard extends AbstractYa
         log.info(" ... initialise new SolrDirectory Index with name {} by 
using Index Configuration {}",
             solrIndexLocation,configName);
         try {
-            File createdIndexDir = 
solrDirectoryManager.createSolrDirectory(solrIndexLocation,configName,null);
-            if (createdIndexDir == null) {
+            IndexMetadata metadata = 
managedServer.createSolrIndex(solrIndexLocation,configName,null);
+            if (metadata == null) {
                 throw new YardException("SolrIndex "+ 
config.getSolrServerLocation() + 
                         " is not available" + 
(config.isDefaultInitialisation() ? 
                                 " and could not be initialised!" : 
                                     ". The necessary Index is not yet 
installed."));
             } else {
                 log.info(" ... created IndexDirectory {} for SolrIndex {} by 
using config {}",
-                    new 
Object[]{createdIndexDir,solrIndexLocation,configName});
+                    new 
Object[]{metadata.getDirectory(),solrIndexLocation,configName});
             }
-            return createdIndexDir;
+            return metadata.getIndexReference();
         } catch (IOException e) {
             throw new YardException("SolrIndex "+ 
config.getSolrServerLocation() + 
                     " could not be initialised!",e);
@@ -574,21 +603,24 @@ public class SolrYard extends AbstractYa
     protected final void deactivate(ComponentContext context) {
         SolrYardConfig config = (SolrYardConfig) getConfig();
         log.info("... deactivating SolrYard " + config.getName() + " (id=" + 
config.getId() + ")");
-        try {
-            SolrServer server;
-            server = getServer();
-            server.commit();
-        } catch (YardException e) {
-            log.debug("Deactivate SolrYard with SolrServer that was never 
initialised");
-        } catch (SolrServerException e) {
-            log.error(
-                String.format("Unable to commit unsaved changes to SolrServer 
%s during deactivate!",
-                    config.getSolrServerLocation()), e);
-        } catch (IOException e) {
-            log.error(
-                String.format("Unable to commit unsaved changes to SolrServer 
%s during deactivate!",
-                    config.getSolrServerLocation()), e);
-        }
+        //Commit in deactivate is not necessary, because either changes are 
+        //committed within add/update/remove, or the commitWithin parameter 
takes
+        //care of missing commites of the SolrCore shuts down.
+//        try {
+//            SolrServer server;
+//            server = getServer();
+//            server.commit();
+//        } catch (YardException e) {
+//            log.debug("Deactivate SolrYard with SolrServer that was never 
initialised");
+//        } catch (SolrServerException e) {
+//            log.error(
+//                String.format("Unable to commit unsaved changes to 
SolrServer %s during deactivate!",
+//                    config.getSolrServerLocation()), e);
+//        } catch (IOException e) {
+//            log.error(
+//                String.format("Unable to commit unsaved changes to 
SolrServer %s during deactivate!",
+//                    config.getSolrServerLocation()), e);
+//        }
         this._server = null;
         this._fieldMapper = null; //in this case we can directly access the 
lazy field
         this.indexValueFactory = null;

Modified: 
incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYardConfig.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYardConfig.java?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYardConfig.java
 (original)
+++ 
incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYardConfig.java
 Wed Nov 23 09:01:33 2011
@@ -22,7 +22,6 @@ import java.util.Map;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.stanbol.commons.solr.SolrServerTypeEnum;
 import org.apache.stanbol.entityhub.core.yard.AbstractYard.YardConfig;
-import org.apache.stanbol.commons.solr.SolrDirectoryManager;
 import org.osgi.service.cm.ConfigurationException;
 
 /**

Modified: 
incubator/stanbol/trunk/entityhub/yard/solr/src/test/java/org/apache/stanbol/entityhub/yard/solr/SolrYardTest.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/test/java/org/apache/stanbol/entityhub/yard/solr/SolrYardTest.java?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/entityhub/yard/solr/src/test/java/org/apache/stanbol/entityhub/yard/solr/SolrYardTest.java
 (original)
+++ 
incubator/stanbol/trunk/entityhub/yard/solr/src/test/java/org/apache/stanbol/entityhub/yard/solr/SolrYardTest.java
 Wed Nov 23 09:01:33 2011
@@ -23,7 +23,7 @@ import java.io.File;
 import java.util.Arrays;
 import java.util.Iterator;
 
-import org.apache.stanbol.commons.solr.SolrDirectoryManager;
+import org.apache.stanbol.commons.solr.managed.ManagedSolrServer;
 import org.apache.stanbol.entityhub.servicesapi.model.Representation;
 import org.apache.stanbol.entityhub.servicesapi.query.FieldQuery;
 import org.apache.stanbol.entityhub.servicesapi.query.QueryResultList;
@@ -60,7 +60,7 @@ public class SolrYardTest extends YardTe
     public static final String TEST_YARD_ID = "testYard";
     public static final String TEST_SOLR_CORE_NAME = "test";
     protected static final String TEST_INDEX_REL_PATH = File.separatorChar + 
"target" + File.separatorChar
-                                                        + 
SolrDirectoryManager.DEFAULT_SOLR_DATA_DIR;
+                                                        + 
ManagedSolrServer.DEFAULT_SOLR_DATA_DIR;
     private static final Logger log = 
LoggerFactory.getLogger(SolrYardTest.class);
 
     @BeforeClass
@@ -70,7 +70,7 @@ public class SolrYardTest extends YardTe
         String prefix = System.getProperty("basedir") == null ? "." : 
"${basedir}";
         String solrServerDir = prefix + TEST_INDEX_REL_PATH;
         log.info("Test Solr Server Directory: " + solrServerDir);
-        System.setProperty(SolrDirectoryManager.MANAGED_SOLR_DIR_PROPERTY, 
solrServerDir);
+        System.setProperty(ManagedSolrServer.MANAGED_SOLR_DIR_PROPERTY, 
solrServerDir);
         SolrYardConfig config = new SolrYardConfig(TEST_YARD_ID, 
TEST_SOLR_CORE_NAME);
         config.setName("Solr Yard Test");
         config.setDescription("The Solr Yard instance used to execute the Unit 
Tests defined for the Yard Interface");

Modified: incubator/stanbol/trunk/integration-tests/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/integration-tests/pom.xml?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/integration-tests/pom.xml (original)
+++ incubator/stanbol/trunk/integration-tests/pom.xml Wed Nov 23 09:01:33 2011
@@ -157,8 +157,8 @@
             <server.ready.timeout.seconds>180</server.ready.timeout.seconds>
             <server.ready.path.1>/:stanbol.css</server.ready.path.1>
             <server.ready.path.2>/engines:There are 
currently</server.ready.path.2>
-            <server.ready.path.3>/contenthub:Recently uploaded Content 
Items</server.ready.path.3>
-            <server.ready.path.4>/factstore:The FactStore implements a 
store</server.ready.path.4>
+            <server.ready.path.3>/factstore:The FactStore implements a 
store</server.ready.path.3>
+            <server.ready.path.4>/contenthub:Recently uploaded Content 
Items</server.ready.path.4>
                              <!-- server.ready.path.5>/ontonet:Apache Stanbol 
OntoNet</server.ready.path.5 -->
             <!-- server.ready.path.6>/reasoners:Apache Stanbol 
Reasoners</server.ready.path.6 -->
           </systemPropertyVariables>

Modified: 
incubator/stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/commons/solr/web/it/DefaultDataDispatchFilterTest.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/commons/solr/web/it/DefaultDataDispatchFilterTest.java?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/commons/solr/web/it/DefaultDataDispatchFilterTest.java
 (original)
+++ 
incubator/stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/commons/solr/web/it/DefaultDataDispatchFilterTest.java
 Wed Nov 23 09:01:33 2011
@@ -31,7 +31,7 @@ public class DefaultDataDispatchFilterTe
     /**
      * the name of the default data index (part of the data.defaultdata bundle)
      */
-    private static final String CORE_NAME = "dbpedia_43k";
+    private static final String CORE_NAME = "dbpedia";
     
     
     public DefaultDataDispatchFilterTest() {

Modified: 
incubator/stanbol/trunk/launchers/basebundlelist/src/main/bundles/list.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/basebundlelist/src/main/bundles/list.xml?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/basebundlelist/src/main/bundles/list.xml 
(original)
+++ incubator/stanbol/trunk/launchers/basebundlelist/src/main/bundles/list.xml 
Wed Nov 23 09:01:33 2011
@@ -335,6 +335,11 @@
     </bundle>
     <bundle>
       <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.solr.managed</artifactId>
+      <version>0.9.0-incubating-SNAPSHOT</version>
+    </bundle>
+    <bundle>
+      <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.commons.solr.install</artifactId>
       <version>0.9.0-incubating-SNAPSHOT</version>
     </bundle>

Modified: incubator/stanbol/trunk/launchers/full-war/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full-war/pom.xml?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full-war/pom.xml (original)
+++ incubator/stanbol/trunk/launchers/full-war/pom.xml Wed Nov 23 09:01:33 2011
@@ -106,7 +106,7 @@
                                <configuration>
                                        <excludes>
                                                <!-- License provided in 
src/main/resources/README -->
-                                               
<exclude>src/main/resources/resources/config/org.apache.stanbol.commons.solr.impl.DefaultSolrDirectoryManager.cfg</exclude>
+                                               
<exclude>src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config</exclude>
                                                
<exclude>src/main/resources/resources/config/org.apache.stanbol.examples.ExampleBootstrapConfig.cfg</exclude>
                                                
<exclude>src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config</exclude>
                                                
<exclude>src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config</exclude>

Modified: 
incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/README
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/README?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/README 
(original)
+++ incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/README 
Wed Nov 23 09:01:33 2011
@@ -15,7 +15,7 @@ limitations under the License.
 
 The following files are provided under the Apache License, Version 2.0:
 
-resources/config/org.apache.stanbol.commons.solr.impl.DefaultSolrDirectoryManager.cfg
+resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 resources/config/org.apache.stanbol.examples.ExampleBootstrapConfig.cfg
 
resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config
 
resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config

Added: 
incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config?rev=1205331&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 (added)
+++ 
incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 Wed Nov 23 09:01:33 2011
@@ -0,0 +1,3 @@
+org.apache.solr.core.CoreContainer.name="default"
+service.ranking=I"2147483647"
+org.apache.solr.core.CoreContainer.publishREST=B"true"

Modified: incubator/stanbol/trunk/launchers/full/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full/pom.xml?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full/pom.xml (original)
+++ incubator/stanbol/trunk/launchers/full/pom.xml Wed Nov 23 09:01:33 2011
@@ -111,7 +111,7 @@
         <configuration>
           <excludes>
             <!-- License provided in src/main/resources/README -->
-            
<exclude>src/main/resources/resources/config/org.apache.stanbol.commons.solr.impl.DefaultSolrDirectoryManager.cfg</exclude>
+            
<exclude>src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config</exclude>
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.examples.ExampleBootstrapConfig.cfg</exclude>
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config</exclude>
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config</exclude>

Modified: incubator/stanbol/trunk/launchers/full/src/main/resources/README
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full/src/main/resources/README?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full/src/main/resources/README (original)
+++ incubator/stanbol/trunk/launchers/full/src/main/resources/README Wed Nov 23 
09:01:33 2011
@@ -15,7 +15,7 @@ limitations under the License.
 
 The following files are provided under the Apache License, Version 2.0:
 
-resources/config/org.apache.stanbol.commons.solr.impl.DefaultSolrDirectoryManager.cfg
+resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 
resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
 resources/config/org.apache.stanbol.examples.ExampleBootstrapConfig.cfg
 
resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config

Added: 
incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config?rev=1205331&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 (added)
+++ 
incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 Wed Nov 23 09:01:33 2011
@@ -0,0 +1,3 @@
+org.apache.solr.core.CoreContainer.name="default"
+service.ranking=I"2147483647"
+org.apache.solr.core.CoreContainer.publishREST=B"true"

Added: 
incubator/stanbol/trunk/launchers/kres/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/kres/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config?rev=1205331&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/launchers/kres/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 (added)
+++ 
incubator/stanbol/trunk/launchers/kres/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 Wed Nov 23 09:01:33 2011
@@ -0,0 +1,3 @@
+org.apache.solr.core.CoreContainer.name="default"
+service.ranking=I"2147483647"
+org.apache.solr.core.CoreContainer.publishREST=B"true"

Modified: incubator/stanbol/trunk/launchers/stable/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/stable/pom.xml?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/stable/pom.xml (original)
+++ incubator/stanbol/trunk/launchers/stable/pom.xml Wed Nov 23 09:01:33 2011
@@ -110,7 +110,7 @@
         <configuration>
           <excludes>
             <!-- License provided in src/main/resources/README -->
-            
<exclude>src/main/resources/resources/config/org.apache.stanbol.commons.solr.impl.DefaultSolrDirectoryManager.cfg</exclude>
+            
<exclude>src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config</exclude>
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.examples.ExampleBootstrapConfig.cfg</exclude>
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config</exclude>
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config</exclude>

Modified: incubator/stanbol/trunk/launchers/stable/src/main/resources/README
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/stable/src/main/resources/README?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/stable/src/main/resources/README 
(original)
+++ incubator/stanbol/trunk/launchers/stable/src/main/resources/README Wed Nov 
23 09:01:33 2011
@@ -15,9 +15,9 @@ limitations under the License.
 
 The following files are provided under the Apache License, Version 2.0:
 
-resources/config/org.apache.stanbol.commons.solr.impl.DefaultSolrDirectoryManager.cfg
+resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 resources/config/org.apache.stanbol.examples.ExampleBootstrapConfig.cfg
 
resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config
 
resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config
 
resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhub.config
-resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
\ No newline at end of file
+resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
\ No newline at end of file

Added: 
incubator/stanbol/trunk/launchers/stable/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/stable/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config?rev=1205331&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/launchers/stable/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 (added)
+++ 
incubator/stanbol/trunk/launchers/stable/src/main/resources/resources/config/org.apache.stanbol.commons.solr.managed.impl.ManagedSolrServerImpl-default.config
 Wed Nov 23 09:01:33 2011
@@ -0,0 +1,3 @@
+org.apache.solr.core.CoreContainer.name="default"
+service.ranking=I"2147483647"
+org.apache.solr.core.CoreContainer.publishREST=B"true"

Modified: incubator/stanbol/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/parent/pom.xml?rev=1205331&r1=1205330&r2=1205331&view=diff
==============================================================================
--- incubator/stanbol/trunk/parent/pom.xml (original)
+++ incubator/stanbol/trunk/parent/pom.xml Wed Nov 23 09:01:33 2011
@@ -265,6 +265,12 @@
         <scope>provided</scope>
       </dependency>
       <dependency>
+           <groupId>org.apache.stanbol</groupId>
+           
<artifactId>org.apache.stanbol.commons.installer.bundleprovider</artifactId>
+        <version>0.9.0-incubating-SNAPSHOT</version>
+        <scope>provided</scope>
+      </dependency>
+      <dependency>
         <groupId>org.apache.stanbol</groupId>
         
<artifactId>org.apache.stanbol.commons.stanboltools.datafileprovider</artifactId>
         <version>0.9.0-incubating-SNAPSHOT</version>
@@ -296,6 +302,12 @@
       </dependency>
       <dependency>
         <groupId>org.apache.stanbol</groupId>
+        <artifactId>org.apache.stanbol.commons.solr.managed</artifactId>
+        <version>0.9.0-incubating-SNAPSHOT</version>
+        <scope>provided</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.stanbol</groupId>
         <artifactId>org.apache.stanbol.commons.solr.install</artifactId>
         <version>0.9.0-incubating-SNAPSHOT</version>
         <scope>provided</scope>
@@ -311,19 +323,19 @@
       <dependency>
         <groupId>org.apache.stanbol</groupId>
         <artifactId>org.apache.stanbol.data.opennlp.ner.en</artifactId>
-        <version>1.0.0-incubating</version>
+        <version>1.0.1-incubating-SNAPSHOT</version>
         <scope>provided</scope>
       </dependency>
       <dependency>
         <groupId>org.apache.stanbol</groupId>
         <artifactId>org.apache.stanbol.data.opennlp.lang.en</artifactId>
-        <version>1.0.0-incubating</version>
+        <version>1.0.1-incubating-SNAPSHOT</version>
         <scope>provided</scope>
       </dependency>
       <dependency>
         <groupId>org.apache.stanbol</groupId>
-        <artifactId>org.apache.stanbol.data.sites.dbpedia.default</artifactId>
-        <version>1.0.2-incubating</version>
+        <artifactId>org.apache.stanbol.data.sites.dbpedia</artifactId>
+        <version>1.0.3-incubating-SNAPSHOT</version>
         <scope>provided</scope>
       </dependency>
 


Reply via email to