You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Michal Hybler <m....@email.cz> on 2007/02/13 10:59:20 UTC
NameSpace
I want to create a custom node type but i have a problem. I dont understand
term namespace. What this term represents? Can i set a random url?
Thanx fo explanation
Michal
--
View this message in context: http://www.nabble.com/NameSpace-tf3219606.html#a8941342
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: NameSpace
Posted by Michael Neale <mi...@gmail.com>.
no that is how you have to access them.
On 2/15/07, Nicolas Dufour <nr...@gmail.com> wrote:
>
> About Namespace and Node Type, I have recently understood that when you
> define a custom node type under a namespace like foo:mynodetype, its
> properties must be prefixed also by the same namespace (example :
> foo:title).
>
> At the end, I have to access to those properties like that :
> mynode.getProperty("foo:title");
>
> Why the properties also must be prefixed because the are part of the node
> anyway ? (for the child nodes i understand easily).
>
> Or do i miss something in my cnd ?
>
> Thanks
>
> Nicolas
>
> On 2/13/07, Michael Neale <mi...@gmail.com> wrote:
> >
> > only when the repo is created new do you need to run it.
> >
> > On 2/13/07, Michal Hybler <m....@email.cz> wrote:
> > >
> > >
> > > I have one omre question. I have a code which register new node type.
> > > Where I
> > > should place it? A have RMI model(jackrabbit webapp on the server and
> my
> > > own
> > > client on other PC) ... Is it enough to run code once or it must be
> > runned
> > > everytime i start the repository?
> > >
> > > Michal Hybler wrote:
> > > >
> > > > Its help me thanks. But must be the page specific or can I use for
> > > example
> > > > "www.google.com"?
> > > >
> > > > Julian Reschke wrote:
> > > >>
> > > >> Michal Hybler schrieb:
> > > >>> I want to create a custom node type but i have a problem. I dont
> > > >>> understand
> > > >>> term namespace. What this term represents? Can i set a random url?
> > > >>> Thanx fo explanation
> > > >>> Michal
> > > >>
> > > >> Namespace URIs in JCR work the same as in XML
> > > >> (<http://www.rpbourret.com/xml/NamespacesFAQ.htm>), they are used
> to
> > > >> avoid name collisions.
> > > >>
> > > >> Thus, you should _not_ use a random URL, but instead one you own
> > (http,
> > > >> mailto, or urn:uuid (<http://greenbytes.de/tech/webdav/rfc4122.html
> >)
> > > >> come to mind).
> > > >>
> > > >> Hope this helps,
> > > >>
> > > >> Julian
> > > >>
> > > >>
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > > http://www.nabble.com/NameSpace-tf3219606.html#a8942634
> > > Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
> > >
> > >
> >
>
Re: NameSpace
Posted by Nicolas Dufour <nr...@gmail.com>.
About Namespace and Node Type, I have recently understood that when you
define a custom node type under a namespace like foo:mynodetype, its
properties must be prefixed also by the same namespace (example :
foo:title).
At the end, I have to access to those properties like that :
mynode.getProperty("foo:title");
Why the properties also must be prefixed because the are part of the node
anyway ? (for the child nodes i understand easily).
Or do i miss something in my cnd ?
Thanks
Nicolas
On 2/13/07, Michael Neale <mi...@gmail.com> wrote:
>
> only when the repo is created new do you need to run it.
>
> On 2/13/07, Michal Hybler <m....@email.cz> wrote:
> >
> >
> > I have one omre question. I have a code which register new node type.
> > Where I
> > should place it? A have RMI model(jackrabbit webapp on the server and my
> > own
> > client on other PC) ... Is it enough to run code once or it must be
> runned
> > everytime i start the repository?
> >
> > Michal Hybler wrote:
> > >
> > > Its help me thanks. But must be the page specific or can I use for
> > example
> > > "www.google.com"?
> > >
> > > Julian Reschke wrote:
> > >>
> > >> Michal Hybler schrieb:
> > >>> I want to create a custom node type but i have a problem. I dont
> > >>> understand
> > >>> term namespace. What this term represents? Can i set a random url?
> > >>> Thanx fo explanation
> > >>> Michal
> > >>
> > >> Namespace URIs in JCR work the same as in XML
> > >> (<http://www.rpbourret.com/xml/NamespacesFAQ.htm>), they are used to
> > >> avoid name collisions.
> > >>
> > >> Thus, you should _not_ use a random URL, but instead one you own
> (http,
> > >> mailto, or urn:uuid (<http://greenbytes.de/tech/webdav/rfc4122.html>)
> > >> come to mind).
> > >>
> > >> Hope this helps,
> > >>
> > >> Julian
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/NameSpace-tf3219606.html#a8942634
> > Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
> >
> >
>
Re: NameSpace
Posted by Michael Neale <mi...@gmail.com>.
only when the repo is created new do you need to run it.
On 2/13/07, Michal Hybler <m....@email.cz> wrote:
>
>
> I have one omre question. I have a code which register new node type.
> Where I
> should place it? A have RMI model(jackrabbit webapp on the server and my
> own
> client on other PC) ... Is it enough to run code once or it must be runned
> everytime i start the repository?
>
> Michal Hybler wrote:
> >
> > Its help me thanks. But must be the page specific or can I use for
> example
> > "www.google.com"?
> >
> > Julian Reschke wrote:
> >>
> >> Michal Hybler schrieb:
> >>> I want to create a custom node type but i have a problem. I dont
> >>> understand
> >>> term namespace. What this term represents? Can i set a random url?
> >>> Thanx fo explanation
> >>> Michal
> >>
> >> Namespace URIs in JCR work the same as in XML
> >> (<http://www.rpbourret.com/xml/NamespacesFAQ.htm>), they are used to
> >> avoid name collisions.
> >>
> >> Thus, you should _not_ use a random URL, but instead one you own (http,
> >> mailto, or urn:uuid (<http://greenbytes.de/tech/webdav/rfc4122.html>)
> >> come to mind).
> >>
> >> Hope this helps,
> >>
> >> Julian
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/NameSpace-tf3219606.html#a8942634
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>
Re: NameSpace
Posted by Michal Hybler <m....@email.cz>.
I have one omre question. I have a code which register new node type. Where I
should place it? A have RMI model(jackrabbit webapp on the server and my own
client on other PC) ... Is it enough to run code once or it must be runned
everytime i start the repository?
Michal Hybler wrote:
>
> Its help me thanks. But must be the page specific or can I use for example
> "www.google.com"?
>
> Julian Reschke wrote:
>>
>> Michal Hybler schrieb:
>>> I want to create a custom node type but i have a problem. I dont
>>> understand
>>> term namespace. What this term represents? Can i set a random url?
>>> Thanx fo explanation
>>> Michal
>>
>> Namespace URIs in JCR work the same as in XML
>> (<http://www.rpbourret.com/xml/NamespacesFAQ.htm>), they are used to
>> avoid name collisions.
>>
>> Thus, you should _not_ use a random URL, but instead one you own (http,
>> mailto, or urn:uuid (<http://greenbytes.de/tech/webdav/rfc4122.html>)
>> come to mind).
>>
>> Hope this helps,
>>
>> Julian
>>
>>
>
>
--
View this message in context: http://www.nabble.com/NameSpace-tf3219606.html#a8942634
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: NameSpace
Posted by Michal Hybler <m....@email.cz>.
Its help me thanks. But must be the page specific or can I use for example
"www.google.com"?
Julian Reschke wrote:
>
> Michal Hybler schrieb:
>> I want to create a custom node type but i have a problem. I dont
>> understand
>> term namespace. What this term represents? Can i set a random url?
>> Thanx fo explanation
>> Michal
>
> Namespace URIs in JCR work the same as in XML
> (<http://www.rpbourret.com/xml/NamespacesFAQ.htm>), they are used to
> avoid name collisions.
>
> Thus, you should _not_ use a random URL, but instead one you own (http,
> mailto, or urn:uuid (<http://greenbytes.de/tech/webdav/rfc4122.html>)
> come to mind).
>
> Hope this helps,
>
> Julian
>
>
--
View this message in context: http://www.nabble.com/NameSpace-tf3219606.html#a8942497
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: NameSpace
Posted by Julian Reschke <ju...@gmx.de>.
Michal Hybler schrieb:
> I want to create a custom node type but i have a problem. I dont understand
> term namespace. What this term represents? Can i set a random url?
> Thanx fo explanation
> Michal
Namespace URIs in JCR work the same as in XML
(<http://www.rpbourret.com/xml/NamespacesFAQ.htm>), they are used to
avoid name collisions.
Thus, you should _not_ use a random URL, but instead one you own (http,
mailto, or urn:uuid (<http://greenbytes.de/tech/webdav/rfc4122.html>)
come to mind).
Hope this helps,
Julian