07-30-2007 03:52 PM
<Recipe>
<Title>Value1</Title>
<Author>Value2</Author>
<Instruction>Value3</Instruction>
<… />
</Recipe>
<bean
id="extracter.xml.sample.selector.XPathSelector"
class="org.alfresco.repo.content.selector.XPathContentWorkerSelector"
init-method="init">
<property name="workers">
<map>
<entry key="/my:test">
<null />
</entry>
<entry key="/Recipe">
<ref bean="extracter.xml.sample.AlfrescoModelMetadataExtracter" />
</entry>
</map>
</property>
</bean>
<bean id="extracter.xml.sample.AlfrescoModelMetadataExtracter"
class="org.alfresco.repo.content.metadata.xml.XPathMetadataExtracter"
parent="baseMetadataExtracter"
init-method="init" >
<property name="mappingProperties">
<bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="author">author</prop>
<prop key="title">title</prop>
<prop key="description">description</prop>
</props>
</property>
</bean>-
</property>
<property name="xpathMappingProperties">
<bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="author">/Recipe/Author/text()</prop>
<prop key="title">/Recipe/Title/text()</prop>
<prop key="description">/Recipe/Instructions/text()</prop>
</props>
</property>
</bean>
</property>
</bean>
07-31-2007 07:38 AM
<prop key="author">author</prop>You'll notice that the sample uses cm:author, but you chose to use just author. cm:author is equivalent (assuming you put in the missing namespace mapping as well) to {http://www.alfresco.org/model/content/1.0}author, while author is equivalent to {}author. They are completely different properties.
select * from alf_node_properties where qname like '{}%';
and see whether there are any values there.07-31-2007 12:02 PM
<bean id="extracter.xml.sample.AlfrescoModelMetadataExtracter"
class="org.alfresco.repo.content.metadata.xml.XPathMetadataExtracter"
parent="baseMetadataExtracter"
init-method="init" >
<property name="mappingProperties">
<bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="namespace.prefix.cm">http://www.alfresco.org/model/content/1.0</prop>
<prop key="title">cm:title</prop>
</props>
</property>
</bean>
</property>
<property name="xpathMappingProperties">
<bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="namespace.prefix.fm">http://www.alfresco.org/model/forum/1.0</prop>
<prop key="title">/Title/text()</prop>
</props>
</property>
</bean>
</property>
</bean>
07-31-2007 03:40 PM
07-31-2007 04:30 PM
15:12:33,958 WARN [org.springframework.remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
15:12:39,877 WARN [org.alfresco.util.OpenOfficeConnectionTester] A connection to OpenOffice could not be established.
15:12:39,897 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from subject to [{http://www.alfresco.org/model/content/1.0}description]
15:12:39,897 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from author to [{http://www.alfresco.org/model/content/1.0}author]
15:12:39,897 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from title to [{http://www.alfresco.org/model/content/1.0}title]
15:12:39,897 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from created to [{http://www.alfresco.org/model/content/1.0}created]
15:12:39,897 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Loaded mapping properties from resource: org/alfresco/repo/content/metadata/PdfBoxMetadataExtracter.properties
15:12:39,897 DEBUG [org.alfresco.repo.content.metadata.MetadataExtracterRegistry] Registering metadata extracter: org.alfresco.repo.content.metadata.PdfBoxMetadataExtracter@1219b8c
15:12:39,927 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from subject to [{http://www.alfresco.org/model/content/1.0}description]
15:12:39,927 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from author to [{http://www.alfresco.org/model/content/1.0}author]
15:12:39,927 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from lastSaveDateTime to [{http://www.alfresco.org/model/content/1.0}modified]
15:12:39,927 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from createDateTime to [{http://www.alfresco.org/model/content/1.0}created]
15:12:39,927 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from title to [{http://www.alfresco.org/model/content/1.0}title]
15:12:39,927 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Loaded mapping properties from resource: org/alfresco/repo/content/metadata/OfficeMetadataExtracter.properties
15:12:39,927 DEBUG [org.alfresco.repo.content.metadata.MetadataExtracterRegistry] Registering metadata extracter: org.alfresco.repo.content.metadata.OfficeMetadataExtracter@939d40
15:12:39,937 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from addressee to [{http://www.alfresco.org/model/content/1.0}addressee]
15:12:39,937 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from addressees to [{http://www.alfresco.org/model/content/1.0}addressees]
15:12:39,937 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from sentDate to [{http://www.alfresco.org/model/content/1.0}sentdate]
15:12:39,937 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from originator to [{http://www.alfresco.org/model/content/1.0}originator, {http://www.alfresco.org/model/content/1.0}author]
15:12:39,937 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from subjectLine to [{http://www.alfresco.org/model/content/1.0}description, {http://www.alfresco.org/model/content/1.0}subjectline]
15:12:39,937 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Loaded mapping properties from resource: org/alfresco/repo/content/metadata/MailMetadataExtracter.properties
15:12:39,937 DEBUG [org.alfresco.repo.content.metadata.MetadataExtracterRegistry] Registering metadata extracter: org.alfresco.repo.content.metadata.MailMetadataExtracter@14cee08
15:12:39,977 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from author to [{http://www.alfresco.org/model/content/1.0}author]
15:12:39,977 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from description to [{http://www.alfresco.org/model/content/1.0}description]
15:12:39,977 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from title to [{http://www.alfresco.org/model/content/1.0}title]
15:12:39,977 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Loaded mapping properties from resource: org/alfresco/repo/content/metadata/HtmlMetadataExtracter.properties
15:12:39,977 DEBUG [org.alfresco.repo.content.metadata.MetadataExtracterRegistry] Registering metadata extracter: org.alfresco.repo.content.metadata.HtmlMetadataExtracter@1be91c8
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from composer to [{mu_sic}composer]
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from trackNumber to [{mu_sic}trackNumber]
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from lyrics to [{mu_sic}lyrics]
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from artist to [{http://www.alfresco.org/model/content/1.0}author, {mu_sic}artist]
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from albumTitle to [{mu_sic}albumTitle]
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from yearReleased to [{mu_sic}yearReleased]
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from comment to [{mu_sic}comment]
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from genre to [{mu_sic}genre]
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from songTitle to [{mu_sic}songTitle, {http://www.alfresco.org/model/content/1.0}title]
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from description to [{http://www.alfresco.org/model/content/1.0}description]
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Loaded mapping properties from resource: org/alfresco/repo/content/metadata/MP_3MetadataExtracter.properties
15:12:39,997 DEBUG [org.alfresco.repo.content.metadata.MetadataExtracterRegistry] Registering metadata extracter: org.alfresco.repo.content.metadata.MP_3MetadataExtracter@a594e1
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from user1 to [{http://www.alfresco.org/model/content/1.0}description]
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from creator to [{http://www.alfresco.org/model/content/1.0}author]
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from date to []
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from printDate to []
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from language to []
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from creationDate to [{http://www.alfresco.org/model/content/1.0}created]
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from keyword to []
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from generator to []
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from subject to [{http://www.alfresco.org/model/content/1.0}description]
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from initialCreator to []
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from title to [{http://www.alfresco.org/model/content/1.0}title]
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from printedBy to []
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from description to []
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Loaded mapping properties from resource: org/alfresco/repo/content/metadata/OpenDocumentMetadataExtracter.properties
15:12:40,027 DEBUG [org.alfresco.repo.content.metadata.MetadataExtracterRegistry] Registering metadata extracter: org.alfresco.repo.content.metadata.OpenDocumentMetadataExtracter@5866c1
15:12:40,037 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from author to [{http://www.alfresco.org/model/content/1.0}author]
15:12:40,037 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from description to [{http://www.alfresco.org/model/content/1.0}description]
15:12:40,037 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from title to [{http://www.alfresco.org/model/content/1.0}title]
15:12:40,037 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Loaded mapping properties from resource: org/alfresco/repo/content/metadata/OpenOfficeMetadataExtracter.properties
15:12:40,988 WARN [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] connection failed: socket,host=localhost,port=8100,tcpNoDelay=1: java.net.ConnectException: Connection refused: connect
15:12:45,525 DEBUG [org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter] Added mapping from title to [{http://www.alfresco.org/model/content/1.0}title]
15:12:45,675 DEBUG [org.alfresco.repo.content.metadata.xml.XPathMetadataExtracter] Added mapping from title to com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl@11c537f
15:12:45,695 DEBUG [org.alfresco.repo.content.metadata.MetadataExtracterRegistry] Registering metadata extracter: org.alfresco.repo.content.metadata.xml.XmlMetadataExtracter@1dc818d
15:12:47,097 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.HSQLDialect.
15:12:47,117 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] Alfresco is using the HSQL default database. Please only use this while evaluating Alfresco, it is NOT recommended for production or deployment!
15:12:49,721 INFO [org.alfresco.repo.domain.schema.SchemaBootstrap] No changes were made to the schema.
15:12:52,825 WARN [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco 'dir.root' property is set to a relative path './alf_data'. 'dir.root' should be overridden to point to a specific folder.
15:12:52,825 INFO [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: .\alf_data
15:12:54,278 INFO [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
15:12:54,428 INFO [org.alfresco.repo.module.ModuleServiceImpl] Found 0 module(s).
15:12:55,019 INFO [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.5.0_09-b01; maximum heap size 506.313MB
15:12:55,019 INFO [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.1.0 (482) schema 64 - Installed version 2.1.0 (482) schema 64
*There were a couple words that your forum's spam filter picked up (MP_3 and mu_sic). I put an underscore to beat the filter.07-31-2007 04:43 PM
The first thing to decide is if the set of registered extractors for WCM must be the same as the that available to the Alfresco Document Management framework. In our sample, this has not been done;
To test the sample, add one of the Alfresco model files to a web project.So, the extractor is not available outside of WCM. To make it available outside of WCM, remove the metadataExtracterRegistry property. The extractor will use the registry defined on the base bean, i.e. the metadataExtracterRegistry and will be available for use in the normal document management side of things.
08-16-2007 11:13 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.