jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Hartford" <dhartf...@ghsinc.com>
Subject Custom nodeType, WebDAV
Date Fri, 29 Dec 2006 17:02:02 GMT
Hey all,
I'm trying to get custom nodeTypes to work, and be able to inject for
and search on those nodetypes through WebDAV.

I've made a custom nodetype in
<nodeTypes xmlns:FAX="http://customfaxnamespace.nowhere"
  <nodeType name="FAX:masternode"
            isMixin="true" hasOrderableChildNodes="false"

    <propertyDefinition name="FAX:category"
                 requiredType="String" autoCreated="true"
                 onParentVersion="IGNORE" protected="false"

?Is the above nodetype definition correct if the expectation is to
populate FAX:category?

Second issue is how to inject this custom property through WebDAV.  It
looks like you are required to use the namespace, but could someone
confirm this please.  Looking at the results in the XMLRepository, they
all store the namespace.

//webdav propertyname
PropertyName pfax = new
//results in the XMLRepo /data
<?xml version="1.0" encoding="UTF-8"?>
<property name="{http://customfaxnamespace.nowhere}category"
parentUUID="2682945c-ed31-419a-b944-90bd13aaa1de" multiValued="false"
definitionId="806470580" modCount="3" type="String">

?When using WebDAV to populate properties, do you need to explicitly
enter the namespace as defined in the nodetype.xml?

Third issue - how do you search using the SQL this new custom nodeType?
String query = "SELECT * from nt:base where contains(FAX:category,
This throws a Bad Request exception
>FAX</dcr:message>.  If I replace FAX with the FQN namespace, it again
throughs an exception on the 'http:' piece.  Since I recently learned
you can not wrap the <searchrequest> header that usually defines the
xlms:<namespace> around the query, I'm a little lost.  As for searching,
not sure if I need to explicitly define indexing somewhere or not for
this new nodeType.

I have already read through
http://jackrabbit.apache.org/doc/nodetype/index.html, and have been
looking at the source, but am confused why this is not working.  Please
forgive my ignorance and rather long e-mail - want to make sure I'm not
missing anything.


View raw message