jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Connelly <dsconne...@adelphia.net>
Subject Session Importer: Question on NodeType matching
Date Wed, 08 Nov 2006 11:27:39 GMT
All:

This is a follow-up on my questions posted per "ThirdHop for structured 
node types".   I have got most of what I want working, but not all.

One remaining problem is that a certain child-node stays unstructured 
although I have provided a structured node type for it.   It is 
difficult to diagnose why I am not getting jcr:primaryType of 
"teneo:proxy" for the "author" child node.

Details below.   The "library:Book" node is imported (correctly) as a 
structured type.   But its child "author" is not.   It should be a 
"teneo:proxy" primary node type.

Could there be a problem here because the"author" element is in the 
un-named namespace, not in the "library" namespace of its parent?    
(XML input is provided to me.   I cannot re-structure it.)

custom_nodetypes.xml (part):

  <nodeType name="teneo:eobject" isMixin="false">
    <supertypes>
      <supertype>mix:referenceable</supertype>
      <supertype>nt:unstructured</supertype>
    </supertypes>
  </nodeType>

    <nodeType name="teneo:proxy" isMixin="false" >
     <supertypes>
      <supertype>nt:base</supertype>
      </supertypes> 
    <propertyDefinition name="href" requiredType="String" 
autoCreated="false" mandatory="true" onParentVersion="COPY" 
protected="false" multiple="false" />
    </nodeType>
   
    <nodeType name="library:Book" isMixin="true" 
hasOrderableChildNodes="false">
        <supertypes>
            <supertype>teneo:eobject</supertype>
        </supertypes>
        <propertyDefinition name="title" requiredType="String" 
autoCreated="false" mandatory="false" onParentVersion="COPY" 
protected="false" multiple="false"/>
        <propertyDefinition name="pages" requiredType="Long" 
autoCreated="false" mandatory="false" onParentVersion="COPY" 
protected="false" multiple="false"/>
        <propertyDefinition name="category" requiredType="String" 
autoCreated="false" mandatory="false" onParentVersion="COPY" 
protected="false" multiple="false"/>
        <childNodeDefinition name="author" 
defaultPrimaryType="teneo:proxy" autoCreated="false" mandatory="true" 
onParentVersion="COPY" protected="false" sameNameSiblings="false" >
          <requiredPrimaryTypes>
            <requiredPrimaryType>teneo:proxy</requiredPrimaryType>
          </requiredPrimaryTypes>
        </childNodeDefinition>
    </nodeType>


Session DocView Import:

<?xml version="1.0" encoding="UTF-8"?>
<library:Book xmlns:library="http://www.example.eclipse.org/Library" 
category="ScienceFiction" pages="500" title="The Hobbit">
<author href="jcr://proxies.test.writer/#/Content.2"/>
</library:Book>


Session DocView Export:

<?xml version="1.0" encoding="UTF-8"?>
<Content.1 xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal" 
xmlns:graffito="http://incubator.apache.org/graffito" 
xmlns:xmi="http://www.omg.org/XMI" 
xmlns:library="http://www.example.eclipse.org/Library" 
xmlns:sv="http://www.jcp.org/jcr/sv/1.0" 
xmlns:mix="http://www.jcp.org/jcr/mix/1.0" 
xmlns:fn="http://www.w3.org/2004/10/xpath-functions" 
xmlns:jcr="http://www.jcp.org/jcr/1.0" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:teneo="http://www.eclipse.org/emft/projects/teneo" 
jcr:primaryType="teneo:content">
<library:Book jcr:primaryType="teneo:eobject" 
jcr:uuid="e22d24a5-9532-4dcc-b45b-38ac045de7e5" pages="500" 
category="ScienceFiction" title="The Hobbit">
<author jcr:primaryType="nt:unstructured" 
href="jcr://proxies.test.writer/#/Content.2"/>
</library:Book>
</Content.1>


Should be: 

............
<author jcr:primaryType="teneo:proxy" 
href="jcr://proxies.test.writer/#/Content.2"/>
...........



Mime
View raw message