You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by an...@apache.org on 2012/03/01 19:49:28 UTC
svn commit: r1295733 - in /incubator/stanbol/trunk:
enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/
enhancer/engines/refactor/src/main/resources/OSGI-INF/metatype/
launchers/full/ launchers/full/src/main/resources/...
Author: anuzzolese
Date: Thu Mar 1 18:49:27 2012
New Revision: 1295733
URL: http://svn.apache.org/viewvc?rev=1295733&view=rev
Log:
STANBOL-468 Committed patch posted by Alberto Musetti.
The patch enables the following points:
* Added the default configuration for the Refactor Enhancement Engine.
* The Refactor Engine runs at the start-up of the full launchers.
Added:
incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.refactor.RefactorEnhancementEngine.config
Modified:
incubator/stanbol/trunk/enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/RefactorEnhancementEngine.java
incubator/stanbol/trunk/enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/RefactorEnhancementEngineConf.java
incubator/stanbol/trunk/enhancer/engines/refactor/src/main/resources/OSGI-INF/metatype/metatype.properties
incubator/stanbol/trunk/launchers/full/pom.xml
incubator/stanbol/trunk/launchers/full/src/main/resources/README
Modified: incubator/stanbol/trunk/enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/RefactorEnhancementEngine.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/RefactorEnhancementEngine.java?rev=1295733&r1=1295732&r2=1295733&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/RefactorEnhancementEngine.java (original)
+++ incubator/stanbol/trunk/enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/RefactorEnhancementEngine.java Thu Mar 1 18:49:27 2012
@@ -99,13 +99,13 @@ import org.slf4j.LoggerFactory;
* The first implementation is targeted to SEO use case. * It retrieves data by dereferencing the entities, *
* includes the DBpedia ontology * refactor the data using the google rich snippets vocabulary.
*
- * @author andrea.nuzzolese
+ * @author andrea.nuzzolese, alberto.musetti
*
*/
@Component(configurationFactory = true, policy = ConfigurationPolicy.REQUIRE, specVersion = "1.1", metatype = true, immediate = true, inherit = true)
@Service
-@Properties(value = {@Property(name = EnhancementEngine.PROPERTY_NAME, value = "seo_refactoring")
+@Properties(value = {@Property(name = EnhancementEngine.PROPERTY_NAME)
})
public class RefactorEnhancementEngine extends AbstractEnhancementEngine<RuntimeException,RuntimeException>
@@ -115,24 +115,23 @@ public class RefactorEnhancementEngine e
* TODO This are the scope and recipe IDs to be used by this implementation In future implementation this
* will be configurable
*/
- @Property(value = "seo")
- public static final String SCOPE = "engine.refactor.scope";
+ @Property()
+ public static final String SCOPE = RefactorEnhancementEngineConf.SCOPE;
- @Property(value = "")
- public static final String RECIPE_LOCATION = "engine.refactor.recipe.location";
+ @Property()
+ public static final String RECIPE_LOCATION = RefactorEnhancementEngineConf.RECIPE_LOCATION;
- @Property(value = "google_rich_snippet_rules")
- public static final String RECIPE_ID = "engine.refactor.recipe.id";
+ @Property()
+ public static final String RECIPE_ID = RefactorEnhancementEngineConf.RECIPE_ID;
- @Property(cardinality = 1000, value = {"http://ontologydesignpatterns.org/ont/iks/kres/dbpedia_demo.owl",
- ""})
- public static final String SCOPE_CORE_ONTOLOGY = "engine.refactor.scope.core.ontology";
+ @Property(cardinality = 1000)
+ public static final String SCOPE_CORE_ONTOLOGY = RefactorEnhancementEngineConf.SCOPE_CORE_ONTOLOGY;
- @Property(boolValue = true)
- public static final String APPEND_OTHER_ENHANCEMENT_GRAPHS = "engine.refactor.append.graphs";
+ @Property()
+ public static final String APPEND_OTHER_ENHANCEMENT_GRAPHS = RefactorEnhancementEngineConf.APPEND_OTHER_ENHANCEMENT_GRAPHS;
- @Property(boolValue = true)
- public static final String USE_ENTITY_HUB = "engine.refactor.entityhub";
+ @Property()
+ public static final String USE_ENTITY_HUB = RefactorEnhancementEngineConf.USE_ENTITY_HUB;
@Reference
ONManager onManager;
Modified: incubator/stanbol/trunk/enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/RefactorEnhancementEngineConf.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/RefactorEnhancementEngineConf.java?rev=1295733&r1=1295732&r2=1295733&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/RefactorEnhancementEngineConf.java (original)
+++ incubator/stanbol/trunk/enhancer/engines/refactor/src/main/java/org/apache/stanbol/enhancer/engines/refactor/RefactorEnhancementEngineConf.java Thu Mar 1 18:49:27 2012
@@ -35,36 +35,36 @@ public interface RefactorEnhancementEngi
/**
* The OntoNet scope that the engine should use.
*/
- String SCOPE = "engine.refactor.scope";
+ String SCOPE = "org.apache.stanbol.enhancer.engines.refactor.scope";
/**
* The location from which the recipe is loaded.
*/
- String RECIPE_LOCATION = "engine.refactor.recipe.location";
+ String RECIPE_LOCATION = "org.apache.stanbol.enhancer.engines.refactor.recipe.location";
/**
* The ID used for identifying the recipe in the RuleStore.
*/
- String RECIPE_ID = "engine.refactor.recipe.id";
+ String RECIPE_ID = "org.apache.stanbol.enhancer.engines.refactor.recipe.id";
/**
* The set of ontology URIs that should be loaded in the core space of the scope.
*/
- String SCOPE_CORE_ONTOLOGY = "engine.refactor.scope.core.ontology";
+ String SCOPE_CORE_ONTOLOGY = "org.apache.stanbol.enhancer.engines.refactor.scope.core.ontology";
/**
* If true: the previously generated RDF is deleted and substituted with the new one.
* If false: the new one is appended to the old RDF.
* Possible value in the configuration: true or false.
*/
- String APPEND_OTHER_ENHANCEMENT_GRAPHS = "engine.refactor.append.graphs";
+ String APPEND_OTHER_ENHANCEMENT_GRAPHS = "org.apache.stanbol.enhancer.engines.refactor.append.graphs";
/**
* If true: entities are fetched via the EntityHub.
* If false: entities are fetched on-line.
* Possible value in the configuration: true or false.
*/
- String USE_ENTITY_HUB = "engine.refactor.entityhub";
+ String USE_ENTITY_HUB = "org.apache.stanbol.enhancer.engines.refactor.entityhub";
public String getScope();
Modified: incubator/stanbol/trunk/enhancer/engines/refactor/src/main/resources/OSGI-INF/metatype/metatype.properties
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/enhancer/engines/refactor/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=1295733&r1=1295732&r2=1295733&view=diff
==============================================================================
--- incubator/stanbol/trunk/enhancer/engines/refactor/src/main/resources/OSGI-INF/metatype/metatype.properties (original)
+++ incubator/stanbol/trunk/enhancer/engines/refactor/src/main/resources/OSGI-INF/metatype/metatype.properties Thu Mar 1 18:49:27 2012
@@ -32,30 +32,26 @@ org.apache.stanbol.enhancer.engines.refa
to refactor the metadata produced by other enhancement engines e.g. to align the \
output of the Stanbol Enhancer to schema.org.
-engine.refactor.scope.name=Scope
-engine.refactor.scope.description=The scope used to perform the refactoring
+org.apache.stanbol.enhancer.engines.refactor.scope.name=Scope
+org.apache.stanbol.enhancer.engines.refactor.scope.description=The scope used to perform the refactoring
-engine.refactor.recipe.id.name=Recipe ID
-engine.refactor.recipe.id.description=The ID used for internally identifying the recipe used to transform the metadata of \
-processed content items.
-
-engine.refactor.recipe.location.name=Recipe Location
-engine.refactor.recipe.location.description=The location from which the recipe of rules will be loaded. \
+org.apache.stanbol.enhancer.engines.refactor.recipe.location.name=Recipe Location
+org.apache.stanbol.enhancer.engines.refactor.recipe.location.description=The location from which the recipe of rules will be loaded. \
It could be either a URL or a file system location. If not filled the default recipe will be loaded.
-engine.refactor.recipe.id.name=Recipe ID
-engine.refactor.recipe.id.description=The ID used for identifying the recipe in the RuleStore.
+org.apache.stanbol.enhancer.engines.refactor.recipe.id.name=Recipe ID
+org.apache.stanbol.enhancer.engines.refactor.recipe.id.description=The ID used for identifying the recipe in the RuleStore.
-engine.refactor.scope.core.ontology.name=Resolvable Ontologies
-engine.refactor.scope.core.ontology.description=To fix a set of resolvable ontology \
+org.apache.stanbol.enhancer.engines.refactor.scope.core.ontology.name=Resolvable Ontologies
+org.apache.stanbol.enhancer.engines.refactor.scope.core.ontology.description=To fix a set of resolvable ontology \
URIs for the scope's ontologies.
-engine.refactor.append.graphs.name=Append Graphs
-engine.refactor.append.graphs.description=If true: the previously generated RDF is \
+org.apache.stanbol.enhancer.engines.refactor.append.graphs.name=Append Graphs
+org.apache.stanbol.enhancer.engines.refactor.append.graphs.description=If true: the previously generated RDF is \
deleted and substituted with the new one. If false: the new one is appended to the \
old RDF. Possible value: true or false.
-engine.refactor.entityhub.name=Use Entityhub
-engine.refactor.entityhub.description=If true: entities are fetched via the EntityHub. \
+org.apache.stanbol.enhancer.engines.refactor.entityhub.name=Use Entityhub
+org.apache.stanbol.enhancer.engines.refactor.entityhub.description=If true: entities are fetched via the EntityHub. \
If false: entities are fetched on-line. Possible value: true or false.
Modified: incubator/stanbol/trunk/launchers/full/pom.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full/pom.xml?rev=1295733&r1=1295732&r2=1295733&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full/pom.xml (original)
+++ incubator/stanbol/trunk/launchers/full/pom.xml Thu Mar 1 18:49:27 2012
@@ -115,6 +115,7 @@
<exclude>src/main/resources/resources/config/org.apache.stanbol.examples.ExampleBootstrapConfig.cfg</exclude>
<exclude>src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.opennlp.impl.NamedEntityExtractionEnhancementEngine-default.config</exclude>
<exclude>src/main/resources/resources/config/org.apache.stanbol.enhancer.chain.weighted.impl.WeightedChain-language.config</exclude>
+ <exclude>src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.refactor.RefactorEnhancementEngine.config</exclude>
</excludes>
</configuration>
</plugin>
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=1295733&r1=1295732&r2=1295733&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full/src/main/resources/README (original)
+++ incubator/stanbol/trunk/launchers/full/src/main/resources/README Thu Mar 1 18:49:27 2012
@@ -24,4 +24,5 @@ resources/config/org.apache.stanbol.enti
resources/config/org.apache.stanbol.enhancer.engines.opennlp.impl.NamedEntityExtractionEnhancementEngine-default.config
resources/config/org.apache.stanbol.examples.ExampleBootstrapConfig.cfg
resources/config/org.apache.stanbol.enhancer.chain.weighted.impl.WeightedChain-language.config
+resources/config/org.apache.stanbol.enhancer.engines.refactor.RefactorEnhancementEngine.config
Added: incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.refactor.RefactorEnhancementEngine.config
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.refactor.RefactorEnhancementEngine.config?rev=1295733&view=auto
==============================================================================
--- incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.refactor.RefactorEnhancementEngine.config (added)
+++ incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.refactor.RefactorEnhancementEngine.config Thu Mar 1 18:49:27 2012
@@ -0,0 +1,7 @@
+stanbol.enhancer.engine.name="seo_refactoring"
+org.apache.stanbol.enhancer.engines.refactor.scope="seo"
+org.apache.stanbol.enhancer.engines.refactor.recipe.id="google_rich_snippet_rules"
+org.apache.stanbol.enhancer.engines.refactor.recipe.location=""
+org.apache.stanbol.enhancer.engines.refactor.scope.core.ontology=["http://ontologydesignpatterns.org/ont/iks/kres/dbpedia_demo.owl"]
+org.apache.stanbol.enhancer.engines.refactor.append.graphs=B"true"
+org.apache.stanbol.enhancer.engines.refactor.entityhub=B"true"