my mapping configuration is straightforward, here are some parts of it:
root:
<class name="fr.opsys.petra.oai.listsets.ListSetsResponse">
<map-to xml="OAI-PMH"
ns-uri="http://www.openarchives.org/OAI/2.0/" />
<field name="responseDate" type="string">
<bind-xml name="responseDate" />
</field>
<field name="incomingRequest"
type="fr.opsys.petra.oai.support.IncomingRequest">
<bind-xml name="request" />
</field>
<field name="sets" collection="arraylist"
type="fr.opsys.petra.oai.Set">
<bind-xml name="set" location="ListSets" />
</field>
<field name="resumptionToken"
type="fr.opsys.petra.oai.ResumptionToken">
<bind-xml name="resumptionToken" location="ListSets" />
</field>
</class>
inner ListSets element (nothing yet for the description):
<class name="fr.opsys.petra.oai.Set">
<map-to xml="set" ns-uri="http://www.openarchives.org/OAI/2.0/"
/>
<field name="spec">
<bind-xml name="setSpec"/>
</field>
<field name="name">
<bind-xml name="setName"/>
</field>
</class>
getting the oai_dc:dc element right is actually the whole point.
thanks.
Arnaud
On Fri, Aug 7, 2009 at 8:11 PM, Werner Guttmann<[email protected]> wrote:
> Hi,
>
> what does your current mapping file look like ? Apart from the
> schemaLocation attribute, this should be possible.
>
> Werner
>
> Arnaud Cogoluegnes wrote:
>> Hi, all.
>>
>> Does anyone know if I can manage to generate such a document with Castor XML
>> :
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
>> http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
>> <responseDate>2002-08-11T07:21:33Z</responseDate>
>> <request verb="ListSets">http://an.oa.org/OAI-script</request>
>> <ListSets>
>> <set>
>> <setSpec>music</setSpec>
>> <setName>Music collection</setName>
>> </set>
>> <set>
>> <setSpec>music:(muzak)</setSpec>
>> <setName>Muzak collection</setName>
>> </set>
>> <set>
>> <setSpec>music:(elec)</setSpec>
>> <setName>Electronic Music Collection</setName>
>> <setDescription>
>> <oai_dc:dc
>> xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
>> xmlns:dc="http://purl.org/dc/elements/1.1/"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/
>> http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
>> <dc:description>This set contains metadata describing
>> electronic music recordings made during the 1950ies
>> </dc:description>
>> </oai_dc:dc>
>> </setDescription>
>> </set>
>> <set>
>> <setSpec>video</setSpec>
>> <setName>Video Collection</setName>
>> </set>
>> </ListSets>
>> </OAI-PMH>
>>
>> I'm doing ok until the embedded oai_dc:dc declaration, I don't see any
>> solution in a XML Castor mapping file to configure such a thing. Any
>> help is welcome.
>>
>> Regards
>>
>> Arnaud
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email