[Hippo-cms7-user] Import tool

marijan milicevic m.milicevic at onehippo.com
Sun Nov 29 18:39:18 CET 2009


Hi Niels, 

it should look like something like:

@ImportField(name = "myns:categories",  repositoryType = RepositoryTypes.REPO_TYPE_NODE, nodeType = true, nodeTypeName = "myns:category"..)
List<Category> categories;



and category class:

@ImportDocument(documentType = "myns:category")
public class Category{

@ImportField(name = "myns:id"..., xpath=...)
private String id;    

....
}


hth,
-m




nvankampenhout wrote:
> New question: how to handle compound types?
>
> My XML documents contains something like:
>
> <document>
>   <categories>
>     <category>
>       <id>123</id>
>       <name>foo</name>
>     </category>
>     <category>
>       <id>456</id>
>       <name>bar</name>
>     </category>
>   </categories>
> </document>
>
> This is to be converted to the following JCR:
>
> [myns:mydoctype] > myns:basedocument
> + myns:categories (myns:category) multiple
>
> [myns:category] > nt:base
> - myns:id (string)
> - myns:name (string)
>
> I can't find anything in the documentation or the example about this.
>
> Thanks,
> Niels
>   





More information about the Hippo-cms7-user mailing list