You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Eric Wong <er...@hotmail.com> on 2003/05/10 06:26:36 UTC
File or Path?
Given a objectnode for the corresponding uri (/users/john/haha.doc)
It is a SubjectNode, A path (/users/john) is also a SubjectNode,
Then how do I know whether the given objectnode is a file or a path?
Thanks a lot..
Eric
_________________________________________________________________
靈格風: 學英語,送15堂普通話 http://go.msnserver.com/HK/26265.asp
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
domain.xml configuration
Posted by Jason Coelho <ja...@netymology.com>.
Hi,
I am running slide using the Slide API, and it is configured using the
Domain.xml file (defined by slide.properties). In the course of time, I
expect that I will have around 10-15 namespaces. Adding namespaces to the
Domain.xml will create problems because the file will grow larger (around
50-70 lines per namespace) and hence become un-manageable.
Is there any other way in which the namespaces can be added. I was looking a
the schema for the Domain configuration and noticed a <namespace-def> tag
that can be used to call external init files. Has anyone had any success
with this ?
Also is the schema at http://jakarta.apache.org/slide/schema/slide.xsd up to
date ???
Thanks in advance
Jason.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: File or Path?
Posted by Wong Kam Lai <kl...@onk.cintec.cuhk.edu.hk>.
I found this maybe useful ...given a resourcePath , SlideToken slideToken.
1. get the ContentHelper, content, by NamespaceAccessToken
2. get this..
NodeRevisionDescriptors revisionDescriptors =
content.retrieve(slideToken, resourcePath);
NodeRevisionNumber revisionNumber =
revisionDescriptors.getLatestRevision();
NodeRevisionDescriptor revisionDescriptor = null;
if (revisionNumber != null) {
try {
revisionDescriptor = content.retrieve
(slideToken, revisionDescriptors);
WebdavUtils.isCollection(revisionDescriptor); //
True means resoucePath is a Collection (Path), false means files
} catch (RevisionDescriptorNotFoundException e) {
..........
}
}
Hope this help
Best Regards,
Kam-Lai Wong
Project Engineer
The Chinese NewsML Community
Center for Innovation and Technology
The Chinese University of Hong Kong
TEL:(852)-26098205
On Mon, 12 May 2003, Michael Smith wrote:
> Eric Wong wrote:
> > Given a objectnode for the corresponding uri (/users/john/haha.doc)
> > It is a SubjectNode, A path (/users/john) is also a SubjectNode, Then
> > how do I know whether the given objectnode is a file or a path?
> > Thanks a lot..
> > Eric
> >
>
> Check the DAV:resourcetype property. It'll contain <collection/> if it's
> a collection ('collection' being the DAV equivalent of a directory).
>
> Mike
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: File or Path?
Posted by Michael Smith <ms...@speedlegal.com>.
Eric Wong wrote:
> Given a objectnode for the corresponding uri (/users/john/haha.doc)
> It is a SubjectNode, A path (/users/john) is also a SubjectNode, Then
> how do I know whether the given objectnode is a file or a path?
> Thanks a lot..
> Eric
>
Check the DAV:resourcetype property. It'll contain <collection/> if it's
a collection ('collection' being the DAV equivalent of a directory).
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org