コード例 #1
0
 protected MutableCachedNode createNamespace(
     SessionCache session, MutableCachedNode parent, String prefix, String uri) {
   Name nodeName =
       prefix.length() != 0
           ? session.getContext().getValueFactories().getNameFactory().create(prefix)
           : ModeShapeLexicon.NAMESPACE;
   return createNode(
       session,
       parent,
       "mode:namespaces-" + uri,
       nodeName,
       ModeShapeLexicon.NAMESPACE,
       propFactory.create(ModeShapeLexicon.URI, uri),
       propFactory.create(ModeShapeLexicon.GENERATED, Boolean.FALSE));
 }
コード例 #2
0
 protected MutableCachedNode createNode(
     SessionCache session,
     MutableCachedNode parent,
     String id,
     Name name,
     Name primaryType,
     Property... properties) {
   NodeKey key = session.getRootKey().withId(id);
   return parent.createChild(
       session, key, name, propFactory.create(JcrLexicon.PRIMARY_TYPE, primaryType), properties);
 }