jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torgeir Veimo <torg...@netenviron.com>
Subject Re: CompactNodeTypeDefReader with JR 2.0
Date Wed, 16 Dec 2009 15:45:21 GMT
2009/12/17 Torgeir Veimo <torgeir@netenviron.com>:
> This class now seems to take an additional constructor parameter, from
> what it did in JR 1.6.
>
> CompactNodeTypeDefReader(Reader r, String systemId,
> DefinitionBuilderFactory<T, N> factory)
>
> Is there any example that shows how to use it, alternatively any other
> way to read in my cnd file with JR 2.0?

Looks like I'm almost there, I've got

CompactNodeTypeDefReader<QNodeTypeDefinition, NamespaceMapping> cndReader =
  new CompactNodeTypeDefReader<QNodeTypeDefinition, NamespaceMapping>(
    fileReader, systemId, new QDefinitionBuilderFactory());

List<QNodeTypeDefinition> ntdList = cndReader.getNodeTypeDefinitions();
for (Iterator<QNodeTypeDefinition> i = ntdList.iterator(); i.hasNext();) {
  QNodeTypeDefinition ntd = i.next();
  ntmgr.registerNodeType(ntd, true);
}

Except that registerNodeType() takes a NodeTypeDefinition, not a
QNodeTypeDefinition. What am I missing here?

-- 
-Tor

Mime
View raw message