test_class.declarator: builder = EMPTY_NODE.builder()
test_class.modifier: private final
test_class.original_string: private final NodeBuilder builder = EMPTY_NODE.builder();
test_class.type: NodeBuilder
test_class.var_name: builder
test_class.declarator: repository
test_class.modifier: private
test_class.original_string: private Repository repository;
test_class.type: Repository
test_class.var_name: repository
test_class.file: oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/search/util/NodeStateCopyUtilsTest.java
test_class.identifier: NodeStateCopyUtilsTest
test_case.body: @Test
      public void copyToJcrAndHiddenProps() throws Exception{
          repository = new Jcr().with(new OpenSecurityProvider()).createRepository();
  
          Tree srcTree = TreeFactory.createTree(builder);
          srcTree.addChild("a").setProperty("foo", "y");
          srcTree.addChild("a").setProperty(JcrConstants.JCR_PRIMARYTYPE, NT_OAK_UNSTRUCTURED, Type.NAME);
          builder.child(":hidden-node").setProperty("x", "y");
          builder.setProperty(":hidden-prop", "y");
  
          Session session = repository.login(null, null);
          Node node = session.getRootNode();
          Node test = node.addNode("test", NT_OAK_UNSTRUCTURED);
  
          NodeStateCopyUtils.copyToNode(builder.getNodeState(), test);
          session.save();
  
          test = session.getNode("/test");
          assertEquals("y", test.getProperty("a/foo").getString());
      }
test_case.class_method_signature: NodeStateCopyUtilsTest.copyToJcrAndHiddenProps()
test_case.full_signature: @Test public void copyToJcrAndHiddenProps()
test_case.identifier: copyToJcrAndHiddenProps
test_case.invocations: createRepository with createTree setProperty addChild setProperty addChild setProperty child setProperty login getRootNode addNode copyToNode getNodeState save getNode assertEquals getString getProperty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void copyToJcrAndHiddenProps()
focal_class.declarator: OAK_CHILD_ORDER = ":childOrder"
focal_class.modifier: private static final
focal_class.original_string: private static final String OAK_CHILD_ORDER = ":childOrder";
focal_class.type: String
focal_class.var_name: OAK_CHILD_ORDER
focal_class.file: oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/util/NodeStateCopyUtils.java
focal_class.identifier: NodeStateCopyUtils
focal_class.class_method_signature: NodeStateCopyUtils.copyToTree(NodeState state, Tree tree)
focal_class.full_signature: public static void copyToTree(NodeState state, Tree tree)
focal_class.identifier: copyToTree
focal_class.modifiers: public static
focal_class.parameters: (NodeState state, Tree tree)
focal_class.return: void
focal_class.signature: void copyToTree(NodeState state, Tree tree)
focal_class.class_method_signature: NodeStateCopyUtils.copyToNode(NodeState state, Node node)
focal_class.full_signature: public static void copyToNode(NodeState state, Node node)
focal_class.identifier: copyToNode
focal_class.modifiers: public static
focal_class.parameters: (NodeState state, Node node)
focal_class.return: void
focal_class.signature: void copyToNode(NodeState state, Node node)
focal_class.class_method_signature: NodeStateCopyUtils.copyProps(NodeState state, Tree tree)
focal_class.full_signature: private static void copyProps(NodeState state, Tree tree)
focal_class.identifier: copyProps
focal_class.modifiers: private static
focal_class.parameters: (NodeState state, Tree tree)
focal_class.return: void
focal_class.signature: void copyProps(NodeState state, Tree tree)
focal_class.class_method_signature: NodeStateCopyUtils.copyProps(NodeState state, Node node)
focal_class.full_signature: private static void copyProps(NodeState state, Node node)
focal_class.identifier: copyProps
focal_class.modifiers: private static
focal_class.parameters: (NodeState state, Node node)
focal_class.return: void
focal_class.signature: void copyProps(NodeState state, Node node)
focal_class.class_method_signature: NodeStateCopyUtils.createValue(ValueFactory vf, PropertyState ps, int index)
focal_class.full_signature: private static Value createValue(ValueFactory vf, PropertyState ps, int index)
focal_class.identifier: createValue
focal_class.modifiers: private static
focal_class.parameters: (ValueFactory vf, PropertyState ps, int index)
focal_class.return: Value
focal_class.signature: Value createValue(ValueFactory vf, PropertyState ps, int index)
focal_class.class_method_signature: NodeStateCopyUtils.getValue(PropertyState ps, Type<T> type, int index)
focal_class.full_signature: private static T getValue(PropertyState ps, Type<T> type, int index)
focal_class.identifier: getValue
focal_class.modifiers: private static
focal_class.parameters: (PropertyState ps, Type<T> type, int index)
focal_class.return: T
focal_class.signature: T getValue(PropertyState ps, Type<T> type, int index)
focal_class.class_method_signature: NodeStateCopyUtils.primaryType(NodeState state)
focal_class.full_signature: private static String primaryType(NodeState state)
focal_class.identifier: primaryType
focal_class.modifiers: private static
focal_class.parameters: (NodeState state)
focal_class.return: String
focal_class.signature: String primaryType(NodeState state)
focal_method.body: public static void copyToNode(NodeState state, Node node) throws RepositoryException {
          copyProps(state, node);
  
          Tree src = TreeFactory.createReadOnlyTree(state);
          for (Tree srcChild : src.getChildren()){
              String childName = srcChild.getName();
  
              if (NodeStateUtils.isHidden(childName)){
                  continue;
              }
  
              NodeState childState = state.getChildNode(childName);
              Node child = JcrUtils.getOrAddNode(node, childName, primaryType(childState));
              copyToNode(childState, child);
          }
      }
focal_method.class_method_signature: NodeStateCopyUtils.copyToNode(NodeState state, Node node)
focal_method.full_signature: public static void copyToNode(NodeState state, Node node)
focal_method.identifier: copyToNode
focal_method.invocations: copyProps createReadOnlyTree getChildren getName isHidden getChildNode getOrAddNode primaryType copyToNode
focal_method.modifiers: public static
focal_method.parameters: (NodeState state, Node node)
focal_method.return: void
focal_method.signature: void copyToNode(NodeState state, Node node)