You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-dev@incubator.apache.org by ruchi goel <Ru...@Sun.COM> on 2007/03/08 07:09:01 UTC
property attributes in jcrmapping versus property attributes in
custom_nodetypes.xml ?
Hi,
I am writing a jcrMapping.xml which will map my java classes to
custom node types.
My custom_nodetypes.xml already has nodetype with properties which have
attributes
requiredType="String" autoCreated="false" mandatory="true"
onParentVersion="COPY" protected="false" multiple="true" />
Then why do I need to add similar attributes in jcrmapping for each
property.* Refer in following extract :*
* <!ATTLIST field-descriptor
fieldName CDATA #REQUIRED
fieldType CDATA #IMPLIED
jcrName CDATA #IMPLIED
id (true | false) "false"
path (true | false) "false"
jcrType (String | Date | Long | Double | Boolean | Binary) #IMPLIED
jcrAutoCreated (true | false) "false"
jcrMandatory (true | false) "false"
jcrOnParentVersion (COPY | VERSION | INITIALIZE | COMPUTE |
IGNORE | ABORT) "COPY"
jcrProtected (true | false) "false"
jcrMultiple (true | false) "false"
>
*
Which one takes the priority ? The one in jcrmapping.xml or the one in
custom_nodetypes.xml
Thanks,
Ruchi
Re: property attributes in jcrmapping versus property attributes in custom_nodetypes.xml ?
Posted by Christophe Lombart <ch...@gmail.com>.
On 3/8/07, ruchi goel <Ru...@sun.com> wrote:
>
> Christophe Lombart wrote:
> > Hi Ruchi,
> >
> > This is not mandatory to add the jcr property attributes in the jcr
> > mapping.
> > There are used only by another component (see the subproject
> > jcr-nodemanagement) in order to create, from the jcrmapping file, the
> > desired jcr node types . By this way, you have only one file to manage
> > but
> > you have to import them from this tools.
>
> Thanks. But if I continue with strategy of maintaining both the
> mapping and nodetypes files,
> *Which one takes the precedence ? The default ones in jcrmapping.xml or
> the one which I specified in
> custom_nodetypes.xml
The one which you specify in yhr custom_nodetypes.
e.g for a property
> *jcrMultiple is default to "false" in mapping file .
> If I specified multiple="true"for the same node property in nodetypes
> file , then which one takes precedence ?
-Ruchi
> *
> *
> >
> > Anyway, I will chek where there are used in the persitence manager
> > implementation and change the code if needed.
> >
> > Thanks,
> > Christophe
> >
> >
> > On 3/8/07, ruchi goel <Ru...@sun.com> wrote:
> >>
> >> Hi,
> >> I am writing a jcrMapping.xml which will map my java classes to
> >> custom node types.
> >> My custom_nodetypes.xml already has nodetype with properties which have
> >> attributes
> >> requiredType="String" autoCreated="false" mandatory="true"
> >> onParentVersion="COPY" protected="false" multiple="true" />
> >>
> >> Then why do I need to add similar attributes in jcrmapping for each
> >> property.* Refer in following extract :*
> >>
> >>
> >>
> >> * <!ATTLIST field-descriptor
> >> fieldName CDATA #REQUIRED
> >> fieldType CDATA #IMPLIED
> >> jcrName CDATA #IMPLIED
> >> id (true | false) "false"
> >> path (true | false) "false"
> >> jcrType (String | Date | Long | Double | Boolean | Binary)
> >> #IMPLIED
> >> jcrAutoCreated (true | false) "false"
> >> jcrMandatory (true | false) "false"
> >> jcrOnParentVersion (COPY | VERSION | INITIALIZE | COMPUTE |
> >> IGNORE | ABORT) "COPY"
> >> jcrProtected (true | false) "false"
> >> jcrMultiple (true | false) "false"
> >> >
> >> *
> >> Which one takes the priority ? The one in jcrmapping.xml or the one in
> >> custom_nodetypes.xml
> >>
> >> Thanks,
> >> Ruchi
> >>
> >
>
>
Re: property attributes in jcrmapping versus property attributes in
custom_nodetypes.xml ?
Posted by ruchi goel <Ru...@Sun.COM>.
Christophe Lombart wrote:
> Hi Ruchi,
>
> This is not mandatory to add the jcr property attributes in the jcr
> mapping.
> There are used only by another component (see the subproject
> jcr-nodemanagement) in order to create, from the jcrmapping file, the
> desired jcr node types . By this way, you have only one file to manage
> but
> you have to import them from this tools.
Thanks. But if I continue with strategy of maintaining both the
mapping and nodetypes files,
*Which one takes the precedence ? The default ones in jcrmapping.xml or
the one which I specified in
custom_nodetypes.xml
e.g for a property
*jcrMultiple is default to "false" in mapping file .
If I specified multiple="true"for the same node property in nodetypes
file , then which one takes precedence ?
-Ruchi
*
*
>
> Anyway, I will chek where there are used in the persitence manager
> implementation and change the code if needed.
>
> Thanks,
> Christophe
>
>
> On 3/8/07, ruchi goel <Ru...@sun.com> wrote:
>>
>> Hi,
>> I am writing a jcrMapping.xml which will map my java classes to
>> custom node types.
>> My custom_nodetypes.xml already has nodetype with properties which have
>> attributes
>> requiredType="String" autoCreated="false" mandatory="true"
>> onParentVersion="COPY" protected="false" multiple="true" />
>>
>> Then why do I need to add similar attributes in jcrmapping for each
>> property.* Refer in following extract :*
>>
>>
>>
>> * <!ATTLIST field-descriptor
>> fieldName CDATA #REQUIRED
>> fieldType CDATA #IMPLIED
>> jcrName CDATA #IMPLIED
>> id (true | false) "false"
>> path (true | false) "false"
>> jcrType (String | Date | Long | Double | Boolean | Binary)
>> #IMPLIED
>> jcrAutoCreated (true | false) "false"
>> jcrMandatory (true | false) "false"
>> jcrOnParentVersion (COPY | VERSION | INITIALIZE | COMPUTE |
>> IGNORE | ABORT) "COPY"
>> jcrProtected (true | false) "false"
>> jcrMultiple (true | false) "false"
>> >
>> *
>> Which one takes the priority ? The one in jcrmapping.xml or the one in
>> custom_nodetypes.xml
>>
>> Thanks,
>> Ruchi
>>
>
Re: property attributes in jcrmapping versus property attributes in custom_nodetypes.xml ?
Posted by Christophe Lombart <ch...@gmail.com>.
Hi Ruchi,
This is not mandatory to add the jcr property attributes in the jcr mapping.
There are used only by another component (see the subproject
jcr-nodemanagement) in order to create, from the jcrmapping file, the
desired jcr node types . By this way, you have only one file to manage but
you have to import them from this tools.
Anyway, I will chek where there are used in the persitence manager
implementation and change the code if needed.
Thanks,
Christophe
On 3/8/07, ruchi goel <Ru...@sun.com> wrote:
>
> Hi,
> I am writing a jcrMapping.xml which will map my java classes to
> custom node types.
> My custom_nodetypes.xml already has nodetype with properties which have
> attributes
> requiredType="String" autoCreated="false" mandatory="true"
> onParentVersion="COPY" protected="false" multiple="true" />
>
> Then why do I need to add similar attributes in jcrmapping for each
> property.* Refer in following extract :*
>
>
>
> * <!ATTLIST field-descriptor
> fieldName CDATA #REQUIRED
> fieldType CDATA #IMPLIED
> jcrName CDATA #IMPLIED
> id (true | false) "false"
> path (true | false) "false"
> jcrType (String | Date | Long | Double | Boolean | Binary)
> #IMPLIED
> jcrAutoCreated (true | false) "false"
> jcrMandatory (true | false) "false"
> jcrOnParentVersion (COPY | VERSION | INITIALIZE | COMPUTE |
> IGNORE | ABORT) "COPY"
> jcrProtected (true | false) "false"
> jcrMultiple (true | false) "false"
> >
> *
> Which one takes the priority ? The one in jcrmapping.xml or the one in
> custom_nodetypes.xml
>
> Thanks,
> Ruchi
>