You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2011/03/15 20:13:40 UTC

svn commit: r1081910 [1/3] - in /incubator/stanbol/trunk: enhancer/engines/autotagging/src/main/java/org/apache/stanbol/enhancer/engines/autotagging/impl/ enhancer/engines/autotagging/src/test/java/org/apache/stanbol/enhancer/engines/autotagging/impl/ ...

Author: rwesten
Date: Tue Mar 15 19:13:38 2011
New Revision: 1081910

URL: http://svn.apache.org/viewvc?rev=1081910&view=rev
Log:
Resolves STANBOL-115: This provides the default configuration for the Stanbol Enhancer full launcher as well as the needed automatic initialization functionality to the SolrYard implementation.

Details:

Stanbol Enhancer:

Added "UTF-8" as explicit encoding after experiencing some char encoding problems.

Added default configuration to the FULL launcher including
 - Stanbol Entityhub configuration
 - DBPedia referenced site (including local caching of used Entities)
 - ReferencedSite EntityTaggingEngine for DBpedia.org

Now the Stanbol Entityhub and the DBpedia.org based Entitiy Enhancement Engine can be used WITHOUT any required configuration steps! However it still requires the remote DBpedia.org service (because no prepared dbPedia index is provided)


Stanbol Entityhub Core:

 - Referenced Site now provides result score information for entity searches answered based on external services. The ordering returned by the external service (EntitySearcher.findEntities(..)) is used.
 - Corrected a Bug in the clone() implementation of FieldQueryImplementation that caused the limit and offset not to be copied to the clone.

Stanbol Entityhub SolrYard:

The SolrYard (when running within an OSGI Environment) now manages an own EmbeddedSolrServer instance. This allows to dynamically add new solar indexes for SolrYard instances created via the ConfigAdminService (e.g. by using the Apache Felix Web Console). This feature is also key to enable the use of the SolrYard in combination with the sling launcher launchpad.
For implementation details see see the java doc of org.apache.stanbol.entityhub.yard.solr.embedded.EmbeddedSolrPorovider.

other changes
 - adapted metatype.properties to reflect the new features
 - corrected/improved error handling for IndexValueFactory
 - adapted the default solr configuration now used to initialize the internally managed EmbeddedSolrServer
 - added a default configuration for initialization of new cores

Added:
    incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.ReferencedSiteEntityTaggingEnhancementEngine-dbPedia.config
    incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config
    incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.core.site.CacheImpl-dbPediaLocalCache.config
    incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.site.referencedSite-dbPediaSite.config
    incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-dbPediaLocalCacheYard.config
    incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhubYard.config
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/utils/ConfigUtils.java   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/admin-extra.html   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/elevate.xml   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/mapping-ISOLatin1Accent.txt   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/protwords.txt   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/schema.xml   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/scripts.conf
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/solrconfig.xml   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/spellings.txt   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/stopwords.txt   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/synonyms.txt   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/xslt/
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/xslt/example.xsl   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/xslt/example_atom.xsl   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/xslt/example_rss.xsl   (with props)
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/xslt/luke.xsl   (with props)
Removed:
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/conf/test/
Modified:
    incubator/stanbol/trunk/enhancer/engines/autotagging/src/main/java/org/apache/stanbol/enhancer/engines/autotagging/impl/RelatedTopicEnhancementEngine.java
    incubator/stanbol/trunk/enhancer/engines/autotagging/src/test/java/org/apache/stanbol/enhancer/engines/autotagging/impl/TestEntityMentionEnhancementEngine.java
    incubator/stanbol/trunk/enhancer/engines/entitytagging/src/test/java/org/apache/stanbol/enhancer/engines/entitytagging/impl/TestEntityLinkingEnhancementEngine.java
    incubator/stanbol/trunk/enhancer/engines/geonames/src/test/java/org/apache/stanbol/enhancer/engines/geonames/impl/TestLocationEnhancementEngine.java
    incubator/stanbol/trunk/enhancer/engines/langid/src/main/java/org/apache/stanbol/enhancer/engines/langid/LangIdEnhancementEngine.java
    incubator/stanbol/trunk/enhancer/engines/opencalais/src/main/java/org/apache/stanbol/enhancer/engines/opencalais/impl/OpenCalaisEngine.java
    incubator/stanbol/trunk/enhancer/engines/zemanta/src/main/java/org/apache/stanbol/enhancer/engines/zemanta/impl/ZemantaEnhancementEngine.java
    incubator/stanbol/trunk/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/resource/EnginesRootResource.java
    incubator/stanbol/trunk/enhancer/jersey/src/test/java/org/apache/stanbol/enhancer/jersey/writers/JsonLdSerializerProviderTest.java
    incubator/stanbol/trunk/entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/impl/ReferencedSiteImpl.java
    incubator/stanbol/trunk/entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/query/FieldQueryImpl.java
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/embedded/EmbeddedSolrPorovider.java
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/impl/SolrYard.java
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/model/IndexValueFactory.java
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/model/TypeConverter.java
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/OSGI-INF/metatype/metatype.properties
    incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/conf/solr.xml

Modified: incubator/stanbol/trunk/enhancer/engines/autotagging/src/main/java/org/apache/stanbol/enhancer/engines/autotagging/impl/RelatedTopicEnhancementEngine.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/autotagging/src/main/java/org/apache/stanbol/enhancer/engines/autotagging/impl/RelatedTopicEnhancementEngine.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/autotagging/src/main/java/org/apache/stanbol/enhancer/engines/autotagging/impl/RelatedTopicEnhancementEngine.java (original)
+++ incubator/stanbol/trunk/enhancer/engines/autotagging/src/main/java/org/apache/stanbol/enhancer/engines/autotagging/impl/RelatedTopicEnhancementEngine.java Tue Mar 15 19:13:38 2011
@@ -75,7 +75,7 @@ public class RelatedTopicEnhancementEngi
         }
         String text;
         try {
-            text = IOUtils.toString(ci.getStream());
+            text = IOUtils.toString(ci.getStream(),"UTF-8");
         } catch (IOException e) {
             throw new InvalidContentException(this, ci, e);
         }

Modified: incubator/stanbol/trunk/enhancer/engines/autotagging/src/test/java/org/apache/stanbol/enhancer/engines/autotagging/impl/TestEntityMentionEnhancementEngine.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/autotagging/src/test/java/org/apache/stanbol/enhancer/engines/autotagging/impl/TestEntityMentionEnhancementEngine.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/autotagging/src/test/java/org/apache/stanbol/enhancer/engines/autotagging/impl/TestEntityMentionEnhancementEngine.java (original)
+++ incubator/stanbol/trunk/enhancer/engines/autotagging/src/test/java/org/apache/stanbol/enhancer/engines/autotagging/impl/TestEntityMentionEnhancementEngine.java Tue Mar 15 19:13:38 2011
@@ -124,7 +124,7 @@ public class TestEntityMentionEnhancemen
     public static void getTextAnnotation(ContentItem ci, String name, String context, UriRef type) {
         String content;
         try {
-            content = IOUtils.toString(ci.getStream());
+            content = IOUtils.toString(ci.getStream(),"UTF-8");
         } catch (IOException e) {
             //should never happen anyway!
             content = "";

Modified: incubator/stanbol/trunk/enhancer/engines/entitytagging/src/test/java/org/apache/stanbol/enhancer/engines/entitytagging/impl/TestEntityLinkingEnhancementEngine.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/entitytagging/src/test/java/org/apache/stanbol/enhancer/engines/entitytagging/impl/TestEntityLinkingEnhancementEngine.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/entitytagging/src/test/java/org/apache/stanbol/enhancer/engines/entitytagging/impl/TestEntityLinkingEnhancementEngine.java (original)
+++ incubator/stanbol/trunk/enhancer/engines/entitytagging/src/test/java/org/apache/stanbol/enhancer/engines/entitytagging/impl/TestEntityLinkingEnhancementEngine.java Tue Mar 15 19:13:38 2011
@@ -109,7 +109,7 @@ public class TestEntityLinkingEnhancemen
     public static void getTextAnnotation(ContentItem ci, String name,String context,UriRef type){
         String content;
         try {
-            content = IOUtils.toString(ci.getStream());
+            content = IOUtils.toString(ci.getStream(),"UTF-8");
         } catch (IOException e) {
             //should never happen anyway!
             content = "";

Modified: incubator/stanbol/trunk/enhancer/engines/geonames/src/test/java/org/apache/stanbol/enhancer/engines/geonames/impl/TestLocationEnhancementEngine.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/geonames/src/test/java/org/apache/stanbol/enhancer/engines/geonames/impl/TestLocationEnhancementEngine.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/geonames/src/test/java/org/apache/stanbol/enhancer/engines/geonames/impl/TestLocationEnhancementEngine.java (original)
+++ incubator/stanbol/trunk/enhancer/engines/geonames/src/test/java/org/apache/stanbol/enhancer/engines/geonames/impl/TestLocationEnhancementEngine.java Tue Mar 15 19:13:38 2011
@@ -122,7 +122,7 @@ public class TestLocationEnhancementEngi
     public static void getTextAnnotation(ContentItem ci, String name, String context, UriRef type) {
         String content;
         try {
-            content = IOUtils.toString(ci.getStream());
+            content = IOUtils.toString(ci.getStream(),"UTF-8");
         } catch (IOException e) {
             //should never happen anyway!
             content = "";

Modified: incubator/stanbol/trunk/enhancer/engines/langid/src/main/java/org/apache/stanbol/enhancer/engines/langid/LangIdEnhancementEngine.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/langid/src/main/java/org/apache/stanbol/enhancer/engines/langid/LangIdEnhancementEngine.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/langid/src/main/java/org/apache/stanbol/enhancer/engines/langid/LangIdEnhancementEngine.java (original)
+++ incubator/stanbol/trunk/enhancer/engines/langid/src/main/java/org/apache/stanbol/enhancer/engines/langid/LangIdEnhancementEngine.java Tue Mar 15 19:13:38 2011
@@ -162,7 +162,7 @@ public class LangIdEnhancementEngine imp
         String text = "";
         if (TEXT_PLAIN_MIMETYPE.equals(ci.getMimeType())) {
             try {
-                text = IOUtils.toString(ci.getStream());
+                text = IOUtils.toString(ci.getStream(),"UTF-8");
             } catch (IOException e) {
                 throw new InvalidContentException(this, ci, e);
             }

Modified: incubator/stanbol/trunk/enhancer/engines/opencalais/src/main/java/org/apache/stanbol/enhancer/engines/opencalais/impl/OpenCalaisEngine.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/opencalais/src/main/java/org/apache/stanbol/enhancer/engines/opencalais/impl/OpenCalaisEngine.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/opencalais/src/main/java/org/apache/stanbol/enhancer/engines/opencalais/impl/OpenCalaisEngine.java (original)
+++ incubator/stanbol/trunk/enhancer/engines/opencalais/src/main/java/org/apache/stanbol/enhancer/engines/opencalais/impl/OpenCalaisEngine.java Tue Mar 15 19:13:38 2011
@@ -181,7 +181,7 @@ public class OpenCalaisEngine implements
         String text = "";
         if (SUPPORTED_MIMETYPES.contains(ci.getMimeType().split(";", 2)[0].toLowerCase())) {
             try {
-                text = IOUtils.toString(ci.getStream());
+                text = IOUtils.toString(ci.getStream(),"UTF-8");
             } catch (IOException e) {
                 throw new InvalidContentException(this, ci, e);
             }

Modified: incubator/stanbol/trunk/enhancer/engines/zemanta/src/main/java/org/apache/stanbol/enhancer/engines/zemanta/impl/ZemantaEnhancementEngine.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/zemanta/src/main/java/org/apache/stanbol/enhancer/engines/zemanta/impl/ZemantaEnhancementEngine.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/zemanta/src/main/java/org/apache/stanbol/enhancer/engines/zemanta/impl/ZemantaEnhancementEngine.java (original)
+++ incubator/stanbol/trunk/enhancer/engines/zemanta/src/main/java/org/apache/stanbol/enhancer/engines/zemanta/impl/ZemantaEnhancementEngine.java Tue Mar 15 19:13:38 2011
@@ -138,7 +138,7 @@ public class ZemantaEnhancementEngine im
     public void computeEnhancements(ContentItem ci) throws EngineException {
         String text;
         try {
-            text = IOUtils.toString(ci.getStream());
+            text = IOUtils.toString(ci.getStream(),"UTF-8");
         } catch (IOException e) {
             throw new InvalidContentException(this, ci, e);
         }

Modified: incubator/stanbol/trunk/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/resource/EnginesRootResource.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/resource/EnginesRootResource.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/resource/EnginesRootResource.java (original)
+++ incubator/stanbol/trunk/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/resource/EnginesRootResource.java Tue Mar 15 19:13:38 2011
@@ -145,7 +145,7 @@ public class EnginesRootResource extends
             @FormParam("format") String format,
             @FormParam("ajax") boolean buildAjaxview,
             @Context HttpHeaders headers) throws EngineException, IOException {
-        ContentItem ci = new InMemoryContentItem(content.getBytes(),
+        log.info("enhance from From: "+content);        ContentItem ci = new InMemoryContentItem(content.getBytes("UTF-8"),
                 TEXT_PLAIN);
         return enhanceAndBuildResponse(format, headers, ci, buildAjaxview);
     }

Modified: incubator/stanbol/trunk/enhancer/jersey/src/test/java/org/apache/stanbol/enhancer/jersey/writers/JsonLdSerializerProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/jersey/src/test/java/org/apache/stanbol/enhancer/jersey/writers/JsonLdSerializerProviderTest.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/jersey/src/test/java/org/apache/stanbol/enhancer/jersey/writers/JsonLdSerializerProviderTest.java (original)
+++ incubator/stanbol/trunk/enhancer/jersey/src/test/java/org/apache/stanbol/enhancer/jersey/writers/JsonLdSerializerProviderTest.java Tue Mar 15 19:13:38 2011
@@ -148,7 +148,7 @@ public class JsonLdSerializerProviderTes
     private void getTextAnnotation(ContentItem ci, String annotationURNExtension, String namedEntity, String context, UriRef type) {
         String content;
         try {
-            content = IOUtils.toString(ci.getStream());
+            content = IOUtils.toString(ci.getStream(),"UTF-8");
         } catch (IOException e) {
             // should never happen anyway!
             content = "";

Added: incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.ReferencedSiteEntityTaggingEnhancementEngine-dbPedia.config
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.ReferencedSiteEntityTaggingEnhancementEngine-dbPedia.config?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.ReferencedSiteEntityTaggingEnhancementEngine-dbPedia.config (added)
+++ incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.ReferencedSiteEntityTaggingEnhancementEngine-dbPedia.config Tue Mar 15 19:13:38 2011
@@ -0,0 +1,8 @@
+org.apache.stanbol.enhancer.engines.entitytagging.nameField="rdfs:label"
+org.apache.stanbol.enhancer.engines.entitytagging.personType="dbp-ont:Person"
+org.apache.stanbol.enhancer.engines.entitytagging.personState=B"true"
+org.apache.stanbol.enhancer.engines.entitytagging.referencedSiteId="dbPedia"
+org.apache.stanbol.enhancer.engines.entitytagging.placeState=B"true"
+org.apache.stanbol.enhancer.engines.entitytagging.organisationState=B"true"
+org.apache.stanbol.enhancer.engines.entitytagging.organisationType="dbp-ont:Organisation"
+org.apache.stanbol.enhancer.engines.entitytagging.placeType="dbp-ont:Place"

Added: incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config (added)
+++ incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config Tue Mar 15 19:13:38 2011
@@ -0,0 +1,8 @@
+org.apache.stanbol.entityhub.description="The\ entityhub\ holding\ all\ locally\ managed\ entities"
+org.apache.stanbol.entityhub.id="entityhub"
+org.apache.stanbol.entityhub.name="Entityhub"
+org.apache.stanbol.entityhub.defaultSymbolState="proposed"
+org.apache.stanbol.entityhub.defaultMappingState="proposed"
+org.apache.stanbol.entityhub.mapping.entityhub=["|\ @\=null;en;de;fr;it","rdfs:label","rdfs:label\ >\ entityhub:label","rdfs:comment","rdfs:comment\ >\ entityhub:description","rdf:type\ |\ d\=entityhub:ref","owl:sameAs\ |\ d\=entityhub:ref","dc:*","dc:title\ >\ entityhub:label","dc:description\ >\ entityhub:description","dc-elements:*","dc-elements:title\ >\ entityhub:label","dc-elements:description\ >\ entityhub:description","geo:lat\ |\ d\=xsd:double","geo:long\ |\ d\=xsd:double","geo:alt\ |\ d\=xsd:int;xsd:float","skos:*","skos:prefLabel\ \ >\ entityhub:label","skos:definition\ >\ entityhub:description","skos:note\ >\ entityhub:description","skos:broader\ |\ d\=entityhub:ref","skos:narrower\ |\ d\=entityhub:ref","skos:related\ |\ d\=entityhub:ref","skos:subject\ |\ d\=entityhub:ref","skos:inScheme\ |\ d\=entityhub:ref","foaf:*","foaf:name\ >\ entityhub:label","foaf:homepage\ |\ d\=xsd:anyURI","foaf:depiction\ |\ d\=xsd:anyURI","foaf:img\ |\ d\=xsd:anyURI","foaf:logo\ |\ d
 \=xsd:anyURI","foaf:page\ |\ d\=xsd:anyURI"]
+org.apache.stanbol.entityhub.yard.entityhubYardId="entityhubYard"
+org.apache.stanbol.entityhub.prefix="urn:org.apache.stanbol:entityhub:"

Added: incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.core.site.CacheImpl-dbPediaLocalCache.config
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.core.site.CacheImpl-dbPediaLocalCache.config?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.core.site.CacheImpl-dbPediaLocalCache.config (added)
+++ incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.core.site.CacheImpl-dbPediaLocalCache.config Tue Mar 15 19:13:38 2011
@@ -0,0 +1,3 @@
+service.pid="org.apache.stanbol.entityhub.core.site.CacheImpl.dbPediaLocalCache"
+org.apache.stanbol.entityhub.yard.cacheYardId="dbPediaCache"
+org.apache.stanbol.entityhub.yard.cache.additionalMappings=["|\ @\=null;en;de;fr;it;es","*"]

Added: incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.site.referencedSite-dbPediaSite.config
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.site.referencedSite-dbPediaSite.config?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.site.referencedSite-dbPediaSite.config (added)
+++ incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.site.referencedSite-dbPediaSite.config Tue Mar 15 19:13:38 2011
@@ -0,0 +1,15 @@
+service.pid="org.apache.stanbol.entityhub.site.referencedSite.dbPediaSite"
+org.apache.stanbol.entityhub.site.entityPrefix=["http://dbpedia.org/resource/","http://dbpedia.org/ontology/"]
+org.apache.stanbol.entityhub.site.defaultMappedEntityState="proposed"
+org.apache.stanbol.entityhub.site.accessUri="http://dbpedia.org/sparql/"
+org.apache.stanbol.entityhub.site.id="dbPedia"
+org.apache.stanbol.entityhub.site.fieldMappings=["dbp-ont:*","dbp-ont:thumbnail\ |\ d\=xsd:anyURI\ >\ foaf:depiction","dbp-prop:latitude\ |\ d\=xsd:decimal\ >\ geo:lat","dbp-prop:longitude\ |\ d\=xsd:decimal\ >\ geo:long","dbp-prop:population\ |\ d\=xsd:integer","dbp-prop:website\ |\ d\=xsd:anyURI\ >\ foaf:homepage"]
+org.apache.stanbol.entityhub.site.dereferencerType="org.apache.stanbol.entityhub.dereferencer.SparqlDereferencer"
+org.apache.stanbol.entityhub.site.cacheStrategy="used"
+org.apache.stanbol.entityhub.site.cacheId="dbPediaCache"
+org.apache.stanbol.entityhub.site.name="DB\ Pedia"
+org.apache.stanbol.entityhub.site.description="The\ OLD\ Endpoint\ for\ Wikipedia"
+org.apache.stanbol.entityhub.site.queryUri="http://dbpedia.org/sparql"
+org.apache.stanbol.entityhub.site.defaultSymbolState="proposed"
+org.apache.stanbol.entityhub.site.defaultExpireDuration="0"
+org.apache.stanbol.entityhub.site.searcherType="org.apache.stanbol.entityhub.searcher.VirtuosoSearcher"

Added: incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-dbPediaLocalCacheYard.config
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-dbPediaLocalCacheYard.config?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-dbPediaLocalCacheYard.config (added)
+++ incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-dbPediaLocalCacheYard.config Tue Mar 15 19:13:38 2011
@@ -0,0 +1,9 @@
+service.pid="org.apache.stanbol.entityhub.yard.solr.impl.SolrYard.dbPediaLocalCacheYard"
+org.apache.stanbol.entityhub.yard.maxQueryResultNumber=I"-1"
+org.apache.stanbol.entityhub.yard.solr.maxBooleanClauses=I"1024"
+org.apache.stanbol.entityhub.yard.description="The\ Cache\ used\ to\ store\ downloaded\ dbPedia\ entities"
+org.apache.stanbol.entityhub.yard.solr.solrUri="cache"
+org.apache.stanbol.entityhub.yard.defaultQueryResultNumber=I"-1"
+org.apache.stanbol.entityhub.yard.name="dbPedia\ Cache"
+org.apache.stanbol.entityhub.yard.id="dbPediaCache"
+org.apache.stanbol.entityhub.yard.solr.multiYardIndexLayout="true"

Added: incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhubYard.config
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhubYard.config?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhubYard.config (added)
+++ incubator/stanbol/trunk/enhancer/launchers/full/src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhubYard.config Tue Mar 15 19:13:38 2011
@@ -0,0 +1,9 @@
+service.pid="org.apache.stanbol.entityhub.yard.solr.impl.SolrYard.entityhubYard"
+org.apache.stanbol.entityhub.yard.maxQueryResultNumber=I"-1"
+org.apache.stanbol.entityhub.yard.solr.maxBooleanClauses=I"1024"
+org.apache.stanbol.entityhub.yard.description="The\ Yard\ used\ by\ the\ Entityhub\ to\ store\ the\ data"
+org.apache.stanbol.entityhub.yard.solr.solrUri="entityhub"
+org.apache.stanbol.entityhub.yard.defaultQueryResultNumber=I"-1"
+org.apache.stanbol.entityhub.yard.name="Entityhub\ Yard"
+org.apache.stanbol.entityhub.yard.id="entityhubYard"
+org.apache.stanbol.entityhub.yard.solr.multiYardIndexLayout="false"

Modified: incubator/stanbol/trunk/entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/impl/ReferencedSiteImpl.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/impl/ReferencedSiteImpl.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/impl/ReferencedSiteImpl.java (original)
+++ incubator/stanbol/trunk/entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/impl/ReferencedSiteImpl.java Tue Mar 15 19:13:38 2011
@@ -45,6 +45,7 @@ import org.apache.stanbol.entityhub.serv
 import org.apache.stanbol.entityhub.servicesapi.model.Representation;
 import org.apache.stanbol.entityhub.servicesapi.model.Sign;
 import org.apache.stanbol.entityhub.servicesapi.model.Symbol;
+import org.apache.stanbol.entityhub.servicesapi.model.rdf.RdfResourceEnum;
 import org.apache.stanbol.entityhub.servicesapi.query.FieldQuery;
 import org.apache.stanbol.entityhub.servicesapi.query.FieldQueryFactory;
 import org.apache.stanbol.entityhub.servicesapi.query.QueryResultList;
@@ -410,7 +411,8 @@ public class ReferencedSiteImpl implemen
             throw new ReferencedSiteException(String.format("Unable to execute query on remote site %s with entitySearcher %s!",
                     queryUri,entitySearcherComponentName), e);
         }
-        List<Sign> entities = new ArrayList<Sign>(entityIds.size());
+        int numResults = entityIds.size();
+        List<Sign> entities = new ArrayList<Sign>(numResults);
         int errors = 0;
         ReferencedSiteException lastError = null;
         for(String id : entityIds){
@@ -421,12 +423,16 @@ public class ReferencedSiteImpl implemen
                     log.warn("Unable to create Entity for ID that was selected by an FieldQuery (id="+id+")");
                 }
                 entities.add(entity);
+                //use the position in the list as resultSocre
+                entity.getRepresentation().set(RdfResourceEnum.resultScore.getUri(), Float.valueOf((float)numResults));
             } catch (ReferencedSiteException e) {
                 lastError = e;
                 errors++;
                 log.warn(String.format("Unable to get Representation for Entity %s. -> %d Error%s for %d Entities in QueryResult (Reason:%s)",
                         id,errors,errors>1?"s":"",entityIds.size(),e.getMessage()));
             }
+            //decrease numResults because it is used as resultScore for entities
+            numResults--;
         }
         if(lastError != null){
             if(entities.isEmpty()){

Modified: incubator/stanbol/trunk/entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/query/FieldQueryImpl.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/query/FieldQueryImpl.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/query/FieldQueryImpl.java (original)
+++ incubator/stanbol/trunk/entityhub/generic/core/src/main/java/org/apache/stanbol/entityhub/core/query/FieldQueryImpl.java Tue Mar 15 19:13:38 2011
@@ -152,6 +152,8 @@ public class FieldQueryImpl implements C
             copyTo.setConstraint(entry.getKey(), entry.getValue());
         }
         copyTo.addSelectedFields(selected);
+        copyTo.setLimit(limit);
+        copyTo.setOffset(offset);
         return copyTo;
     }
     @Override

Modified: incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/embedded/EmbeddedSolrPorovider.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/embedded/EmbeddedSolrPorovider.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/embedded/EmbeddedSolrPorovider.java (original)
+++ incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/embedded/EmbeddedSolrPorovider.java Tue Mar 15 19:13:38 2011
@@ -37,7 +37,11 @@ import org.apache.solr.client.solrj.Solr
 import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer;
 import org.apache.solr.core.CoreContainer;
 import org.apache.solr.core.CoreDescriptor;
+import org.apache.solr.core.SolrCore;
 import org.apache.stanbol.entityhub.yard.solr.provider.SolrServerProvider;
+import org.apache.stanbol.entityhub.yard.solr.provider.SolrServerProvider.Type;
+import org.apache.stanbol.entityhub.yard.solr.utils.ConfigUtils;
+import org.osgi.framework.BundleContext;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -46,7 +50,25 @@ import org.xml.sax.SAXException;
  * Support for the use of {@link EmbeddedSolrPorovider} in combination with the
  * SolrYard implementation. This implements the {@link SolrServerProvider}
  * interface for the {@link Type#EMBEDDED}.<p>
- * TODO: Describe the configuration of the embedded SolrServer
+ * This implementation also adds support for dynamic configuration of an
+ * {@link EmbeddedSolrServer} within the "/data" directory provided by the
+ * OSGI Environment for the SolrYard bundle. This Embedded SolrServer is 
+ * configured using an default configuration part of the SolrYard Bundle. The
+ * Indexes are located at an folder with the name {@link #DEFAULT_SOLR_DATA_DIR}
+ * (see {@link BundleContext#getDataFile(String)}).<p>
+ * If a relative path is parsed as second parameter to 
+ * {@link #getSolrServer(org.apache.stanbol.entityhub.yard.solr.provider.SolrServerProvider.Type, String, String...)}
+ * than the value is looked up by using the internally managed EmbeddedSolrServer.<p>
+ * This implementation also supports the dynamic initialisation, creation and
+ * registration of new Cores for the internally managed EmbeddedSolrServer.
+ * So if a parsed relative path does not correspond with an existing SolrCore,
+ * than the default Core configuration (part of the SolrYard bundle) is used
+ * to create the missing core.<p>
+ * Note that it is also a valid Scenario that an other components copies data
+ * (e.g. a prepared index) to the directory used by the internally managed
+ * EmbeddedSolrServer. Than this implementation just registers the new core
+ * with the EmbeddedSolrServer (creation and registration of the Core).
+ * 
  * @author Rupert Westenthaler
  *
  */
@@ -63,6 +85,14 @@ public class EmbeddedSolrPorovider imple
     
     @Property
     public static final String SOLR_HOME = "solr.solr.home";
+
+    public static final String DEFAULT_SOLR_DATA_DIR = "indexes";
+    
+    /**
+     * The component context. Only available when running within an OSGI 
+     * Environment and the component is active.
+     */
+    private ComponentContext componentContext;
     
     public EmbeddedSolrPorovider() {
     }
@@ -80,11 +110,19 @@ public class EmbeddedSolrPorovider imple
                 index = new File(fileUri);
             } catch (URISyntaxException e) {
                 //also not an URI -> ignore
+            } catch (IllegalArgumentException e){
+                //URI can not be converted to a file (e.g. not an absolute URI starting with "file:")
             }
             if(!index.exists()){
-                throw new IllegalArgumentException(String.format("The parsed Index Path %s does not exist",uriOrPath));
+                //try to init the core via the default EmbeddedSolrServer
+                // -> Initialised based on the default values in the bundle
+                index = initCoreDirectory(uriOrPath);
+                if(index == null){
+                    throw new IllegalArgumentException(String.format("The parsed Index Path %s does not exist",uriOrPath));
+                }
             }
         }
+        File coreDir = null;
         if(index.isDirectory()){
             File solr = getFile(index, "solr.xml");
             String coreName;
@@ -96,6 +134,7 @@ public class EmbeddedSolrPorovider imple
                 if(solr != null){
                     //assume this is a multi core
                     coreName = index.getName();
+                    coreDir = index;
                     index = index.getParentFile(); //set the index dir to the parent
                 } else {
                     throw new IllegalArgumentException(String.format("The parsed Index Path %s is not an Solr " +
@@ -105,11 +144,88 @@ public class EmbeddedSolrPorovider imple
             }
             //now init the EmbeddedSolrServer
             log.info(String.format("Create EmbeddedSolrServer for index %s and core %s",index.getAbsolutePath(),coreName));
-            return new EmbeddedSolrServer(getCoreContainer(index.getAbsolutePath(), solr), coreName);
+            CoreContainer coreContainer = getCoreContainer(index.getAbsolutePath(), solr);
+            //if we have a multi core environment and the core is not yet registered
+            if(!coreName.isEmpty() && !coreContainer.getCoreNames().contains(coreName)){
+                //register this core first
+                /*
+                 * NOTE: This assumes that the data for the core are already copied
+                 * to the required location, but the core itself is not yet registered
+                 * in the solr.xml.
+                 * This uses the java API to register the core. Changes are saved
+                 * within the solr.xml if persistent="true" is present within the
+                 * solr element.
+                 */
+                /*
+                 * NOTE:
+                 * We need to reset the ContextClassLoader to the one used for this
+                 * Bundle, because Solr uses this ClassLoader to load all the
+                 * plugins configured in the solr.xml and schema.xml.
+                 * The finally block resets the context class loader to the previous
+                 * value. (Rupert Westenthaler 20010209)
+                 */
+                ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+                Thread.currentThread().setContextClassLoader(EmbeddedSolrPorovider.class.getClassLoader());
+                try {
+                    //SolrResourceLoader solrLoader = new SolrResourceLoader(coreDir.getAbsolutePath());
+                    CoreDescriptor coreDescriptor = new CoreDescriptor(coreContainer,coreName,coreDir.getAbsolutePath());
+                    SolrCore core;
+                    try {
+                        core = coreContainer.create(coreDescriptor);
+                    } catch (Exception e) {
+                        throw new IllegalStateException(
+                            String.format("Unable to load/register Solr Core %s " +
+                            		"to SolrServer %s!",coreName,index.getAbsoluteFile()),e);
+                    }
+                    coreContainer.register(coreName, core,false);
+                } finally {
+                    Thread.currentThread().setContextClassLoader(classLoader);
+                }
+            }
+            return new EmbeddedSolrServer(coreContainer, coreName);
         } else {
             throw new IllegalArgumentException(String.format("The parsed Index Path %s is no Directory",uriOrPath));
         }
     }
+    /**
+     * Getter for the defaultCore
+     * @param coreName the name of the core or <code>null</code> to get/init the
+     * default directory of the default CoreContainer.<p>
+     * Works only within an OSGI Environment
+     * @return the directory (instanceDir) of the core or the solr server (if
+     * <code>null</code> is parsed as coreName). <code>null</code> is returned
+     * if the initialisation was not successful.
+     */
+    protected final File initCoreDirectory(final String coreName){
+        ComponentContext context = componentContext;
+        if(context == null){ //not within OSGI Environment and active! 
+            return null; //no default core container available
+        }
+        File defaultCoreDirectory = context.getBundleContext().getDataFile(DEFAULT_SOLR_DATA_DIR);
+        if(!defaultCoreDirectory.exists()){
+            try {
+                defaultCoreDirectory = ConfigUtils.copyDefaultConfig(context.getBundleContext().getBundle(),
+                    defaultCoreDirectory, false);
+            } catch (Exception e) {
+                log.warn("Unable to initialise the default EmbeddedSolrServer!",e);
+                return null;
+            }
+        }
+        if(coreName == null){
+            return defaultCoreDirectory;
+        }
+        File coreDir = new File(defaultCoreDirectory,coreName);
+        if(!coreDir.exists()){
+            try {
+                ConfigUtils.copyCore(context.getBundleContext().getBundle(),
+                    coreDir, null, false);
+            } catch (Exception e) {
+                log.warn("Unable to initialise the core "+coreName+" with the default Core configuration!",e);
+                return null;
+            }
+        }
+        return coreDir;
+    }
     
     protected final CoreContainer getCoreContainer(String solrDir, File solrConf) throws IllegalArgumentException, IllegalStateException {
         CoreContainer container = coreContainers.get(solrDir);
@@ -147,9 +263,11 @@ public class EmbeddedSolrPorovider imple
     }
     @Activate
     protected void activate(ComponentContext context) {
+        this.componentContext = context;
     }
     @Deactivate
     protected void deactivate(ComponentContext context) {
+        this.componentContext = null;
         //should we remove the coreContainers -> currently I don't because
         // (1) activate deactivate do not have any affect
         // (2) it are soft references anyway.

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=1081910&r1=1081909&r2=1081910&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 Tue Mar 15 19:13:38 2011
@@ -121,11 +121,11 @@ import org.slf4j.LoggerFactory;
         //TODO: Added propertied from AbstractYard to fix ordering!
         @Property(name=Yard.ID,value="entityhubYard"),
         @Property(name=Yard.NAME,value="Entityhub Yard"),
-        @Property(name=Yard.DESCRIPTION,value="Default values for configuring the RickYard without editing"),
+        @Property(name=Yard.DESCRIPTION,value="The Yard used by the Entityhub to store the data"),
         @Property(name=AbstractYard.DEFAULT_QUERY_RESULT_NUMBER,intValue=-1),
         @Property(name=AbstractYard.MAX_QUERY_RESULT_NUMBER,intValue=-1),
         //BEGIN SolrYard specific Properties
-        @Property(name=SolrYard.SOLR_SERVER_LOCATION,value="http://localhost:8181/solr/entityhub"),
+        @Property(name=SolrYard.SOLR_SERVER_LOCATION,value="entityhub"),
         @Property(name=SolrYard.MULTI_YARD_INDEX_LAYOUT,options={
             @PropertyOption(name="true",value="true"),
             @PropertyOption(name="false",value="false")},value="false"),

Modified: incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/model/IndexValueFactory.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/model/IndexValueFactory.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/model/IndexValueFactory.java (original)
+++ incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/model/IndexValueFactory.java Tue Mar 15 19:13:38 2011
@@ -270,12 +270,15 @@ public class IndexValueFactory {
 
         @Override
         public Date createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException {
-            if(value == null){
-                return null;
+            if(type == null){
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
             }
-            if(type == null || !type.equals(INDEX_TYPE)){
+            if(!type.equals(INDEX_TYPE)) {
                 throw new UnsupportedIndexTypeException(this,type);
             }
+            if(value == null){
+                return null;
+            }
             if(value instanceof Date){
                 return (Date) value;
             } else if(value instanceof Calendar){
@@ -329,12 +332,15 @@ public class IndexValueFactory {
 
         @Override
         public Boolean createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException {
-            if(value == null){
-                return null;
+            if(type == null){
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
             }
-            if(type == null || !type.equals(INDEX_TYPE)){
+            if(!type.equals(INDEX_TYPE)){
                 throw new UnsupportedIndexTypeException(this,type);
             }
+            if(value == null){
+                return null;
+            }
             if(value instanceof Boolean){
                 return (Boolean)value;
             } else {
@@ -386,7 +392,10 @@ public class IndexValueFactory {
             return INDEX_TYPE;
         }
         @Override
-        public String createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException {
+        public String createObject(IndexDataType type, Object value, String lang) throws NullPointerException {
+            if(type == null){
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
+            }
             return value!=null?value.toString():null;
         }
     }
@@ -431,14 +440,14 @@ public class IndexValueFactory {
             return INDEX_TYPE;
         }
         @Override
-        public Integer createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException {
+        public Integer createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException, NullPointerException {
             if(type == null){
-                throw new UnsupportedIndexTypeException(this,type);
-            }
-            if(value == null){
-                return null;
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
             }
             if(type.equals(INDEX_TYPE)){
+                if(value == null){ //move in here to ensure returning UnsupportedIndexTypeException on wrong types
+                    return null;
+                }
                 if(value instanceof Integer){
                     return (Integer)value;
                 } else {
@@ -449,6 +458,9 @@ public class IndexValueFactory {
                     }
                 }
             } else if(acceptLong && type.equals(IndexDataTypeEnum.LONG.getIndexType())){
+                if(value == null){ //move in here to ensure returning UnsupportedIndexTypeException on wrong types
+                    return null;
+                }
                 long longValue;
                 if(value instanceof Long){
                     longValue = ((Long)value).longValue();
@@ -460,7 +472,7 @@ public class IndexValueFactory {
                     }
                 }
                 if(Integer.MAX_VALUE >= longValue && Integer.MIN_VALUE <= longValue){
-                        return new Integer((int)longValue);
+                        return Integer.valueOf((int)longValue);
                 } else {
                     //parsed long value outside of the int range
                     throw new UnsupportedValueException(this, type, value,
@@ -502,14 +514,14 @@ public class IndexValueFactory {
         }
 
         @Override
-        public Long createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException {
+        public Long createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException,NullPointerException {
             if(type == null){
-                throw new UnsupportedIndexTypeException(this, type);
-            }
-            if(value == null){
-                return null;
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
             }
             if(type.equals(LONG_TYPE) || type.equals(INT_TYPE)){
+                if(value == null){
+                    return null;
+                }
                 if(value instanceof Long){
                     return (Long) value;
                 } else if(value instanceof Integer){
@@ -562,11 +574,14 @@ public class IndexValueFactory {
         }
 
         @Override
-        public Double createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException {
-            if(value == null){
-                return null;
+        public Double createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException, NullPointerException {
+            if(type == null){
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
             }
             if(SUPPORTED.contains(type)){
+                if(value == null){
+                    return null;
+                }
                 if(value instanceof Double){
                     return (Double) value;
                 } else if(value instanceof Float){
@@ -632,11 +647,14 @@ public class IndexValueFactory {
             return INDEX_TYPE;
         }
         @Override
-        public Float createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException {
-            if(value == null){
-                return null;
+        public Float createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException, NullPointerException {
+            if(type == null) {
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
             }
             if(supported.contains(type)){
+                if(value == null){
+                    return null;
+                }
                 if(value instanceof Float){
                     return (Float) value;
                 } else if(value instanceof Double){
@@ -683,14 +701,14 @@ public class IndexValueFactory {
         }
 
         @Override
-        public BigInteger createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException {
+        public BigInteger createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException, NullPointerException {
             if(type == null){
-                throw new UnsupportedIndexTypeException(this, type);
-            }
-            if(value == null){
-                return null;
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
             }
             if(type.equals(INDEX_TYPE) || type.equals(INT_TYPE)){
+                if(value == null){
+                    return null;
+                }
                 try {
                     return new BigInteger(value.toString());
                 }catch (NumberFormatException e) {
@@ -724,11 +742,14 @@ public class IndexValueFactory {
             return createObject(value.getType(),value.getValue(), value.getLanguage());
         }
         @Override
-        public BigDecimal createObject(IndexDataType type,Object value, String lang) {
-            if(value == null){
-                return null;
+        public BigDecimal createObject(IndexDataType type,Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException, NullPointerException {
+            if(type == null){
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
             }
             if(SUPPORTED.contains(type)){
+                if(value == null){
+                    return null;
+                }
                 try {
                     return new BigDecimal(value.toString());
                 } catch (NumberFormatException e) {
@@ -782,14 +803,14 @@ public class IndexValueFactory {
             return INDEX_TYPE;
         }
         @Override
-        public Text createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException {
+        public Text createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException, NullPointerException {
             if(type == null){
-                throw new UnsupportedIndexTypeException(this, type);
-            }
-            if(value == null){
-                return null;
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
             }
             if(type.equals(INDEX_TYPE) || type.equals(STRING_TYPE)){
+                if(value == null){
+                    return null;
+                }
                 return valueFactory.createText(value.toString(), lang);
             } else {
                 throw new UnsupportedIndexTypeException(this, type);
@@ -828,11 +849,14 @@ public class IndexValueFactory {
             return INDEX_TYPE;
         }
         @Override
-        public Reference createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException {
-            if(value == null){
-                return null;
+        public Reference createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException, UnsupportedValueException, NullPointerException {
+            if(type == null) {
+                throw new NullPointerException("The parsed IndexDataType MUST NOT be null");
             }
-            if(type != null && type.equals(INDEX_TYPE)){
+            if(type.equals(INDEX_TYPE)){
+                if(value == null){
+                    return null;
+                }
                 return valueFactory.createReference(value.toString());
             } else {
                 throw new UnsupportedIndexTypeException(this, type);

Modified: incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/model/TypeConverter.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/model/TypeConverter.java?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/model/TypeConverter.java (original)
+++ incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/model/TypeConverter.java Tue Mar 15 19:13:38 2011
@@ -42,13 +42,16 @@ public interface TypeConverter<T> {
      * Creates an java instance representing the parsed value as returned by the
      * index.
      * @param type the index data type of the value. MUST NOT be <code>null</code>
-     * @param value the value within the index. If <code>null</code> this method returns <code>null</code>.
+     * @param value the value within the index. If <code>null</code> this method 
+     * returns <code>null</code>.
      * @param lang the language
      * @return the java instance representing the parsed index value
      * @throws UnsupportedValueException if the value can not be processed by the
      * Converter
+     * @throws NullPointerException of the parsed {@link IndexDataType} is 
+     * <code>null</code>
      */
-    T createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException,UnsupportedValueException;
+    T createObject(IndexDataType type, Object value, String lang) throws UnsupportedIndexTypeException,UnsupportedValueException, NullPointerException;
     /**
      * Getter for the java type
      * @return the java class of the instances created by this converter

Added: incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/utils/ConfigUtils.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/utils/ConfigUtils.java?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/utils/ConfigUtils.java (added)
+++ incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/utils/ConfigUtils.java Tue Mar 15 19:13:38 2011
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.stanbol.entityhub.yard.solr.utils;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Enumeration;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer;
+import org.apache.solr.client.solrj.request.CoreAdminRequest;
+import org.apache.stanbol.entityhub.yard.solr.embedded.EmbeddedSolrPorovider;
+import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This Utility provides Methods that copy a configuration from a {@link Bundle}
+ * and copy it to a directory.<p>
+ * This is currently used by the {@link EmbeddedSolrPorovider} to initialise the
+ * internally managed {@link EmbeddedSolrServer} and/or to add additional cores.
+ * However such methods are also useful for the initialisation of an prepared
+ * index. Assuming that such prepared indexes are provided as a OSGI bundle.
+ * @author Rupert Westenthaler
+ *
+ */
+public class ConfigUtils {
+    /**
+     * The logger
+     */
+    private static final Logger log = LoggerFactory.getLogger(ConfigUtils.class);
+    /**
+     * The name of the directoy used in the bundle to search for the default config
+     */
+    public static final String CONFIG_DIR = "solr/conf";
+    /**
+     * The name of the root directoy used within an bundle to search for all cores
+     * that need to be added to an existing solr multi core configuration
+     */
+    public static final String CORE_CONFIG_DIR = "solr/core";
+    /**
+     * Initialises the default configuration for the SolrYard based on data in
+     * the parsed bundle. The configuration will be copied to the parsed root
+     * directory.
+     * @param bundle the bundle used to load the defaultConfiguration from the
+     * {@link #CONFIG_DIR} (value=" {@value #CONFIG_DIR}") directory.
+     * @param rootDir the target directory for the configuration. 
+     * @param override if true existing configurations are overridden.
+     * @return the root directory of the solr configuration (same as parsed as rootDir)
+     * @throws IOException On any IO error while coping the configuration
+     * @throws NullPointerException if <code>null</code> is parsed as bundle or rootDir
+     * @throws IllegalStateException If the parsed bundle is in the {@link Bundle#UNINSTALLED}
+     * state, the parsed rootDir does exist but is not a directory.
+     * @throws IllegalArgumentException If the parsed bundle does not contain the
+     * required information to set up an configuration 
+     */
+    @SuppressWarnings("unchecked") //Enumeration<URL> required by OSGI specification
+    public static File copyDefaultConfig(Bundle bundle, File rootDir,boolean override) throws IOException, NullPointerException, IllegalStateException, IllegalArgumentException {
+        if(bundle == null){
+            throw new NullPointerException("The parsed Bundle MUST NOT be NULL!");
+        }
+        if(rootDir == null){
+            throw new NullPointerException("The parsed root directory MUST NOT be NULL!");
+        }
+        if(rootDir.exists() && !rootDir.isDirectory()){
+            throw new IllegalStateException("The parsed root directory "+rootDir.getAbsolutePath()+" extists but is not a directory!");
+        }
+        log.info(String.format("Copy Default Config from Bundle %s to %s (override=%s)",
+            (bundle.getSymbolicName()+bundle.getVersion()),rootDir.getAbsolutePath(),override));
+        Enumeration<URL> resources = (Enumeration<URL>) bundle.findEntries(CONFIG_DIR, "*.*", true);
+        //TODO: check validity of config and thorw IllegalArgumentException if not valid
+        while(resources.hasMoreElements()){
+            URL resource = resources.nextElement();
+            copyResource(rootDir, resource, CONFIG_DIR,override);
+        }
+        log.debug(" ... default Configuration copied to "+rootDir.getAbsolutePath());
+        return rootDir;
+    }
+
+    /**
+     * Copies a resource (URL of an resource within a Bundle) to a file
+     * @param rootDir the directory used as target
+     * @param resource the resource URL
+     * @param context the context used to search for the relative path within the URL
+     * @param override if resources in the target should be overridden if they already exist
+     * @throws IOException on any IO error
+     */
+    private static void copyResource(File rootDir, URL resource, String context, boolean override) throws IOException {
+        if(!(context.charAt(context.length()-1) == '/')){
+            context = context+'/';
+        }
+        String resourcePath = resource.toString();
+        int contextPos = resourcePath.lastIndexOf(context);
+        if(contextPos >=0){
+            contextPos = contextPos+context.length();
+        } else {
+            log.warn(String.format("Context %s not found in resource %s -> ignored!",
+                context,resource));
+            return;
+        }
+        String relativePath = resourcePath.substring(contextPos);
+        String[] relativePathElements = relativePath.split("/");
+        File parentElement = rootDir;
+        for(int i=0;i<relativePathElements.length-1;i++){
+            File pathElement = new File(parentElement,relativePathElements[i]);
+            if(!pathElement.exists()){
+                pathElement.mkdir();
+            }
+            parentElement = pathElement;
+        }
+        File file = new File(parentElement,relativePathElements[relativePathElements.length-1]);
+        boolean overrideState = false;
+        if(file.exists() && override){
+            FileUtils.deleteQuietly(file);
+            overrideState = true;
+        }
+        if(!file.exists()) {
+            FileUtils.copyURLToFile(resource, file);
+            log.debug(String.format(" > %s %s",overrideState?"override":"copy",relativePath));
+        }
+    }
+    /**
+     * Copy the configuration of an core.
+     * @param bundle The bundle used to load the core
+     * @param coreDir the target directory for the core
+     * @param coreName the core name or <code>null</code> to directly load the
+     * configuration as present under {@value #CONFIG_DIR} in the bundle. This
+     * property can be used if a bundle needs to provide multiple core
+     * configurations
+     * @param override if files in the target directory should be overridden
+     * @throws IOException On any IO error while coping the configuration
+     * @throws NullPointerException if <code>null</code> is parsed as bundle or coreDir
+     * @throws IllegalStateException If the parsed bundle is in the {@link Bundle#UNINSTALLED}
+     * state, the parsed coreDir does exist but is not a directory.
+     * @throws IllegalArgumentException If the parsed bundle does not contain the
+     * required information to set up an configuration or the parsed coreName is empty.
+     */
+    @SuppressWarnings("unchecked") //Enumeration<URL> required by OSGI specification
+    public static void copyCore(Bundle bundle, File coreDir, String coreName, boolean override) throws IOException,NullPointerException,IllegalStateException,IllegalArgumentException{
+        if(bundle == null){
+            throw new NullPointerException("The parsed Bundle MUST NOT be NULL!");
+        }
+        if(coreDir == null){
+            throw new NullPointerException("The parsed core directory MUST NOT be NULL!");
+        }
+        if(coreDir.exists() && !coreDir.isDirectory()){
+            throw new IllegalStateException("The parsed core directory "+coreDir.getAbsolutePath()+" extists but is not a directory!");
+        }
+        if(coreName!= null && coreName.isEmpty()){
+            throw new IllegalArgumentException("The parsed core name MUST NOT be empty (However NULL is supported)!");
+        }
+        String context = CORE_CONFIG_DIR+(coreName!=null?'/'+coreName:"");
+        Enumeration<URL> resources = (Enumeration<URL>) bundle.findEntries(context, "*.*", true);
+        while(resources.hasMoreElements()){
+            URL resource = resources.nextElement();
+            copyResource(coreDir, resource, context, override);
+        }
+    }
+}

Propchange: incubator/stanbol/trunk/entityhub/yard/solr/src/main/java/org/apache/stanbol/entityhub/yard/solr/utils/ConfigUtils.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/OSGI-INF/metatype/metatype.properties (original)
+++ incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/OSGI-INF/metatype/metatype.properties Tue Mar 15 19:13:38 2011
@@ -3,8 +3,8 @@ org.apache.stanbol.entityhub.yard.solr.i
 org.apache.stanbol.entityhub.yard.solr.impl.SolrYard.description=Used to configure a Yard (storage component of the Entityhub) based on a Solr instance
 
 #org.apache.stanbol.entityhub.yard.solr.solrUri
-org.apache.stanbol.entityhub.yard.solr.solrUri.name=Solr Server URL
-org.apache.stanbol.entityhub.yard.solr.solrUri.description=The URL where the Solr Server is running
+org.apache.stanbol.entityhub.yard.solr.solrUri.name=Solr Index/Core
+org.apache.stanbol.entityhub.yard.solr.solrUri.description=This can be either the URL of a SolrServer, the absolute Path to an index/core an the local file system or just the core name to use the EmbeddedSolrServer internally managed by the SolrYard
 
 #org.apache.stanbol.entityhub.yard.solr.multiYardIndexLayout
 org.apache.stanbol.entityhub.yard.solr.multiYardIndexLayout.name=Multiple Yard Layout
@@ -29,3 +29,7 @@ org.apache.stanbol.entityhub.yard.maxQue
 #org.apache.stanbol.entityhub.yard.solr.defaultQueryResultNumber
 org.apache.stanbol.entityhub.yard.defaultQueryResultNumber.name=Default Query Results
 org.apache.stanbol.entityhub.yard.defaultQueryResultNumber.description=The default number of results set for queries that do not define such a value (set to <= 0 for no restriction, values > maximumQueryResult will be replaced by maximumQueryResult)
+
+#org.apache.stanbol.entityhub.yard.solr.maxBooleanClauses
+org.apache.stanbol.entityhub.yard.solr.maxBooleanClauses.name=Max Boolean Clauses
+org.apache.stanbol.entityhub.yard.solr.maxBooleanClauses.description=This is the maximum number of boolean clauses allowed for Solr queries. This value is configured in the solrconf.xml by the maxBooleanClauses element. 
\ No newline at end of file

Modified: incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/conf/solr.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/conf/solr.xml?rev=1081910&r1=1081909&r2=1081910&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/conf/solr.xml (original)
+++ incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/conf/solr.xml Tue Mar 15 19:13:38 2011
@@ -26,20 +26,24 @@
   - cache: this yard is intended for caches with CacheStrategy "used".
            Multiple SolrYards can used this cache if "Multiple Yard Layout"
            is set to true.
-  - test: This core is intended to be used for testing reasons only.
   
   To add additional Cores 
     - create a sub directory with the value configured by instanceDir. 
     - Copy the "conf" Directory of an other core.
     - You can change/optimise the configuration.
+    
+  NOTE: This configuration is also used for the EmbeddedSolrServer managed by
+        the SolrYard.
+        The index data and configurations of this EmbeddedSolrServer can be found
+        in the "/data" directory of the SolrYard bundle.
+        Note also that the SolrYard dynamically creates and registers Cores based 
+        on SolrYard instances created via the OSGI ConfigAdmin service.
 -->
 <solr persistent="true">
   <cores adminPath="/admin/cores">
     <!-- RickYard Core: This core is reservated for the rickYard 
          Please do not use for Caches! -->
     <core name="entityhub" instanceDir="entityhub" />
-    <!-- Test Core: Do not use this Cor for real data!-->
-    <core name="test" instanceDir="test" />
     <!-- Core that is used by multiple Yards typically used for
          Referenced Sites with CacheStrategy "used" 
     -->

Added: incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/admin-extra.html
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/admin-extra.html?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/admin-extra.html (added)
+++ incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/admin-extra.html Tue Mar 15 19:13:38 2011
@@ -0,0 +1,31 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- The content of this page will be statically included into the top
+of the admin page.  Uncomment this as an example to see there the content
+will show up.
+
+<hr>
+<i>This line will appear before the first table</i>
+<tr>
+<td colspan="2">
+This row will be appended to the end of the first table
+</td>
+</tr>
+<hr>
+
+-->

Propchange: incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/admin-extra.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/elevate.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/elevate.xml?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/elevate.xml (added)
+++ incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/elevate.xml Tue Mar 15 19:13:38 2011
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- If this file is found in the config directory, it will only be
+     loaded once at startup.  If it is found in Solr's data
+     directory, it will be re-loaded every commit.
+-->
+
+<elevate>
+<!--
+ <query text="foo bar">
+  <doc id="1" />
+  <doc id="2" />
+  <doc id="3" />
+ </query>
+ 
+ <query text="ipod">
+   <doc id="MA147LL/A" />  <!- put the actual ipod at the top ->
+   <doc id="IW-02" exclude="true" /> <!- exclude this cable ->
+ </query>
+-->
+</elevate>

Propchange: incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/elevate.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/mapping-ISOLatin1Accent.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/mapping-ISOLatin1Accent.txt?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/mapping-ISOLatin1Accent.txt (added)
+++ incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/mapping-ISOLatin1Accent.txt Tue Mar 15 19:13:38 2011
@@ -0,0 +1,246 @@
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Syntax:
+#   "source" => "target"
+#     "source".length() > 0 (source cannot be empty.)
+#     "target".length() >= 0 (target can be empty.)
+
+# example:
+#   "À" => "A"
+#   "\u00C0" => "A"
+#   "\u00C0" => "\u0041"
+#   "ß" => "ss"
+#   "\t" => " "
+#   "\n" => ""
+
+# À => A
+"\u00C0" => "A"
+
+# Á => A
+"\u00C1" => "A"
+
+# Â => A
+"\u00C2" => "A"
+
+# Ã => A
+"\u00C3" => "A"
+
+# Ä => A
+"\u00C4" => "A"
+
+# Å => A
+"\u00C5" => "A"
+
+# Æ => AE
+"\u00C6" => "AE"
+
+# Ç => C
+"\u00C7" => "C"
+
+# È => E
+"\u00C8" => "E"
+
+# É => E
+"\u00C9" => "E"
+
+# Ê => E
+"\u00CA" => "E"
+
+# Ë => E
+"\u00CB" => "E"
+
+# Ì => I
+"\u00CC" => "I"
+
+# Í => I
+"\u00CD" => "I"
+
+# Î => I
+"\u00CE" => "I"
+
+# Ï => I
+"\u00CF" => "I"
+
+# IJ => IJ
+"\u0132" => "IJ"
+
+# Ð => D
+"\u00D0" => "D"
+
+# Ñ => N
+"\u00D1" => "N"
+
+# Ò => O
+"\u00D2" => "O"
+
+# Ó => O
+"\u00D3" => "O"
+
+# Ô => O
+"\u00D4" => "O"
+
+# Õ => O
+"\u00D5" => "O"
+
+# Ö => O
+"\u00D6" => "O"
+
+# Ø => O
+"\u00D8" => "O"
+
+# Π=> OE
+"\u0152" => "OE"
+
+# Þ
+"\u00DE" => "TH"
+
+# Ù => U
+"\u00D9" => "U"
+
+# Ú => U
+"\u00DA" => "U"
+
+# Û => U
+"\u00DB" => "U"
+
+# Ü => U
+"\u00DC" => "U"
+
+# Ý => Y
+"\u00DD" => "Y"
+
+# Ÿ => Y
+"\u0178" => "Y"
+
+# à => a
+"\u00E0" => "a"
+
+# á => a
+"\u00E1" => "a"
+
+# â => a
+"\u00E2" => "a"
+
+# ã => a
+"\u00E3" => "a"
+
+# ä => a
+"\u00E4" => "a"
+
+# å => a
+"\u00E5" => "a"
+
+# æ => ae
+"\u00E6" => "ae"
+
+# ç => c
+"\u00E7" => "c"
+
+# è => e
+"\u00E8" => "e"
+
+# é => e
+"\u00E9" => "e"
+
+# ê => e
+"\u00EA" => "e"
+
+# ë => e
+"\u00EB" => "e"
+
+# ì => i
+"\u00EC" => "i"
+
+# í => i
+"\u00ED" => "i"
+
+# î => i
+"\u00EE" => "i"
+
+# ï => i
+"\u00EF" => "i"
+
+# ij => ij
+"\u0133" => "ij"
+
+# ð => d
+"\u00F0" => "d"
+
+# ñ => n
+"\u00F1" => "n"
+
+# ò => o
+"\u00F2" => "o"
+
+# ó => o
+"\u00F3" => "o"
+
+# ô => o
+"\u00F4" => "o"
+
+# õ => o
+"\u00F5" => "o"
+
+# ö => o
+"\u00F6" => "o"
+
+# ø => o
+"\u00F8" => "o"
+
+# œ => oe
+"\u0153" => "oe"
+
+# ß => ss
+"\u00DF" => "ss"
+
+# þ => th
+"\u00FE" => "th"
+
+# ù => u
+"\u00F9" => "u"
+
+# ú => u
+"\u00FA" => "u"
+
+# û => u
+"\u00FB" => "u"
+
+# ü => u
+"\u00FC" => "u"
+
+# ý => y
+"\u00FD" => "y"
+
+# ÿ => y
+"\u00FF" => "y"
+
+# ff => ff
+"\uFB00" => "ff"
+
+# fi => fi
+"\uFB01" => "fi"
+
+# fl => fl
+"\uFB02" => "fl"
+
+# ffi => ffi
+"\uFB03" => "ffi"
+
+# ffl => ffl
+"\uFB04" => "ffl"
+
+# ſt => ft
+"\uFB05" => "ft"
+
+# st => st
+"\uFB06" => "st"

Propchange: incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/mapping-ISOLatin1Accent.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/protwords.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/protwords.txt?rev=1081910&view=auto
==============================================================================
--- incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/protwords.txt (added)
+++ incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/protwords.txt Tue Mar 15 19:13:38 2011
@@ -0,0 +1,21 @@
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#-----------------------------------------------------------------------
+# Use a protected word file to protect against the stemmer reducing two
+# unrelated words to the same base word.
+
+# Some non-words that normally won't be encountered,
+# just to test that they won't be stemmed.
+dontstems
+zwhacky
+

Propchange: incubator/stanbol/trunk/entityhub/yard/solr/src/main/resources/solr/core/conf/protwords.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain