org.locationtech.geogig.model.Node.update()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中org.locationtech.geogig.model.Node.update()方法的一些代码示例,展示了Node.update()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.update()方法的具体详情如下:
包路径:org.locationtech.geogig.model.Node
类名称:Node
方法名:update

Node.update介绍

暂无

代码示例

代码示例来源:origin: org.locationtech.geogig/geogig-api

  1. /**
  2. * Creates a new {@code NodeRef} with the updated {@link ObjectId} and {@link Envelope}.
  3. *
  4. * @param newId the updated {@link ObjectId}
  5. * @param newBounds the updated bounds
  6. * @return the newly created {@code NodeRef}
  7. */
  8. public NodeRef update(final ObjectId newId, final @Nullable Envelope newBounds) {
  9. Node newNode = node.update(newId, newBounds);
  10. return NodeRef.create(parentPath, newNode, metadataId);
  11. }

代码示例来源:origin: locationtech/geogig

  1. /**
  2. * Creates a new {@code NodeRef} with the updated {@link ObjectId} and {@link Envelope}.
  3. *
  4. * @param newId the updated {@link ObjectId}
  5. * @param newBounds the updated bounds
  6. * @return the newly created {@code NodeRef}
  7. */
  8. public NodeRef update(final ObjectId newId, final @Nullable Envelope newBounds) {
  9. Node newNode = node.update(newId, newBounds);
  10. return NodeRef.create(parentPath, newNode, metadataId);
  11. }

代码示例来源:origin: locationtech/geogig

  1. public Node update(final ObjectId newId) {
  2. return update(newId, bounds().orNull());
  3. }

代码示例来源:origin: org.locationtech.geogig/geogig-api

  1. public Node update(final ObjectId newId) {
  2. return update(newId, bounds().orNull());
  3. }

代码示例来源:origin: locationtech/geogig

  1. public boolean remove(Node node) {
  2. if (!node.getObjectId().isNull()) {
  3. node = node.update(ObjectId.NULL);
  4. }
  5. int delta = put(node);
  6. return -1 == delta;
  7. }

代码示例来源:origin: org.locationtech.geogig/geogig-core

  1. public boolean remove(Node node) {
  2. if (!node.getObjectId().isNull()) {
  3. node = node.update(ObjectId.NULL);
  4. }
  5. int delta = put(node);
  6. return -1 == delta;
  7. }

代码示例来源:origin: locationtech/geogig

  1. Envelope newBounds = new Envelope(n.bounds().get());
  2. newBounds.translate(0.1, 0.1);
  3. Node c = n.update(newId, newBounds);
  4. expectedChanges.put(n, c);
  5. newNodes.add(c);

代码示例来源:origin: org.locationtech.geogig/geogig-core

  1. Envelope newBounds = new Envelope(n.bounds().get());
  2. newBounds.translate(0.1, 0.1);
  3. Node c = n.update(newId, newBounds);
  4. expectedChanges.put(n, c);
  5. newNodes.add(c);

代码示例来源:origin: locationtech/geogig

  1. public RevTree build(ObjectStore store) {
  2. final ObjectId treeId = this.node.getObjectId();
  3. final RevTree original = EMPTY_TREE_ID.equals(treeId) ? EMPTY : store.getTree(treeId);
  4. RevTreeBuilder builder = RevTreeBuilder.builder(store, original);
  5. ImmutableList<Node> currentTrees = original.trees();
  6. currentTrees.forEach(builder::remove);
  7. for (MutableTree childTree : this.childTrees.values()) {
  8. childTree.build(store);
  9. Node newNode = childTree.node;
  10. builder.put(newNode);
  11. }
  12. final Node oldNode = this.node;
  13. RevTree newTree = builder.build();
  14. Envelope newBounds = SpatialOps.boundsOf(newTree);
  15. Node newNode = oldNode.update(newTree.getId(), newBounds);
  16. this.node = newNode;
  17. return newTree;
  18. }

代码示例来源:origin: org.locationtech.geogig/geogig-core

  1. public RevTree build(ObjectStore store) {
  2. final ObjectId treeId = this.node.getObjectId();
  3. final RevTree original = EMPTY_TREE_ID.equals(treeId) ? EMPTY : store.getTree(treeId);
  4. CanonicalTreeBuilder builder = CanonicalTreeBuilder.create(store, original);// .clearSubtrees();
  5. ImmutableList<Node> currentTrees = original.trees();
  6. currentTrees.forEach((n) -> builder.remove(n.getName()));
  7. for (MutableTree childTree : this.childTrees.values()) {
  8. childTree.build(store);
  9. Node newNode = childTree.node;
  10. builder.put(newNode);
  11. }
  12. final Node oldNode = this.node;
  13. RevTree newTree = builder.build();
  14. Envelope newBounds = SpatialOps.boundsOf(newTree);
  15. Node newNode = oldNode.update(newTree.getId(), newBounds);
  16. this.node = newNode;
  17. return newTree;
  18. }

代码示例来源:origin: locationtech/geogig

  1. newBounds.translate(0.1, 0.1);
  2. Node newNode = oldNode.update(newId, newBounds);
  3. builder.update(oldNode, newNode);
  4. removedNodes.add(oldNode);

代码示例来源:origin: locationtech/geogig

  1. Node update = oldNode.update(newId, newBounds);

代码示例来源:origin: org.locationtech.geogig/geogig-core

  1. Node update = oldNode.update(newId, newBounds);

代码示例来源:origin: org.locationtech.geogig/geogig-core

  1. newBounds.translate(0.1, 0.1);
  2. Node newNode = oldNode.update(newId, newBounds);
  3. builder.update(oldNode, newNode);
  4. removedNodes.add(oldNode);

代码示例来源:origin: locationtech/geogig

  1. objectStore.put(updatedFeature);
  2. Node update = n.update(updatedFeature.getId(), newBounds);
  3. changedNodes.add(update);
  4. builder.put(update);

代码示例来源:origin: org.locationtech.geogig/geogig-core

  1. objectStore.put(updatedFeature);
  2. Node update = n.update(updatedFeature.getId(), newBounds);
  3. changedNodes.add(update);
  4. builder.put(update);

代码示例来源:origin: org.locationtech.geogig/geogig-core

  1. Node node2Update = node2.update(RevObjectTestSupport.hashString("node2update"));
  2. Node node3Update = node3.update(RevObjectTestSupport.hashString("node3update"),
  3. new Envelope(-3, -3, -1, -1));

代码示例来源:origin: locationtech/geogig

  1. Node node2Update = node2.update(RevObjectTestSupport.hashString("node2update"));
  2. Node node3Update = node3.update(RevObjectTestSupport.hashString("node3update"),
  3. new Envelope(-3, -3, -1, -1));

代码示例来源:origin: locationtech/geogig

  1. TYPE.FEATURE, null, null);
  2. Node updated = node.update(oId2);
  3. assertEquals(oId1, node.getObjectId());
  4. assertEquals(oId2, updated.getObjectId());
  5. updated = node.update(oId2);
  6. assertEquals(oId1, node.getObjectId());
  7. assertEquals(oId2, updated.getObjectId());
  8. null, null);
  9. updated = node.update(oId2);
  10. assertEquals(oId1, node.getObjectId());
  11. assertEquals(oId2, updated.getObjectId());

相关文章