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

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

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

Node.getName介绍

暂无

代码示例

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

  1. /**
  2. * @return the simple name of the {@link Node} this object points to
  3. */
  4. public String name() {
  5. return node.getName();
  6. }

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

  1. /**
  2. * @see CanonicalNodeNameOrder#bucket(String, int)
  3. */
  4. public int bucket(final Node ref, final int depth) {
  5. return CanonicalNodeNameOrder.bucket(ref.getName(), depth);
  6. }
  7. }

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

  1. /**
  2. * @return a {@link NodeId} whose {@link NodeId#value() value} is the node's
  3. * {@link Node#bounds() bounds} {@link Envelope} or {@code null}
  4. */
  5. @Override
  6. public NodeId computeId(final Node node) {
  7. @Nullable
  8. Envelope bounds = node.bounds().orNull();
  9. return new NodeId(node.getName(), bounds);
  10. }

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

  1. private void asMap(String parentPath, TreeMap<String, MutableTree> target) {
  2. for (MutableTree childTree : this.childTrees.values()) {
  3. String childTreePath = NodeRef.appendChild(parentPath, childTree.getNode().getName());
  4. target.put(childTreePath, childTree);
  5. childTree.asMap(childTreePath, target);
  6. }
  7. }

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

  1. @Override
  2. public MutableTree clone() {
  3. MutableTree clone = new MutableTree(node);
  4. for (MutableTree child : this.childTrees.values()) {
  5. clone.childTrees.put(child.getNode().getName(), child.clone());
  6. }
  7. return clone;
  8. }
  9. }

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

  1. @Override
  2. public MutableTree clone() {
  3. MutableTree clone = new MutableTree(node);
  4. for (MutableTree child : this.childTrees.values()) {
  5. clone.childTrees.put(child.getNode().getName(), child.clone());
  6. }
  7. return clone;
  8. }
  9. }

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

  1. private IndexInfo createIndex(@Nullable String... extraAttributes) {
  2. Map<String, Object> metadata = new HashMap<>();
  3. metadata.put(IndexInfo.MD_QUAD_MAX_BOUNDS, new Envelope(-180, 180, -90, 90));
  4. if (extraAttributes != null && extraAttributes.length > 0) {
  5. metadata.put(IndexInfo.FEATURE_ATTRIBUTES_EXTRA_DATA, extraAttributes);
  6. }
  7. IndexInfo indexInfo;
  8. indexInfo = indexdb.createIndexInfo(worldPointsLayer.getName(), "geom", IndexType.QUADTREE,
  9. metadata);
  10. return indexInfo;
  11. }

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

  1. private void verifyMetadata(Node node) {
  2. if (node.getMetadataId().isPresent()) {
  3. ObjectId mdId = node.getMetadataId().get();
  4. String msg = "RevFeatureType " + mdId + " is not present (from " + node.getName() + ")";
  5. assertTrue(msg, objectDb.exists(mdId));
  6. }
  7. }

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

  1. @Test
  2. public void testUpdateMultipleMatchingIndexes() {
  3. indexdb.createIndexInfo(worldPointsLayer.getName(), "x", IndexType.QUADTREE, null);
  4. indexdb.createIndexInfo(worldPointsLayer.getName(), "y", IndexType.QUADTREE, null);
  5. exception.expect(IllegalArgumentException.class);
  6. exception.expectMessage(
  7. "Multiple indexes were found for the specified tree, please specify the attribute.");
  8. geogig.command(UpdateIndexOp.class)//
  9. .setTreeRefSpec(worldPointsLayer.getName())//
  10. .call();
  11. }

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

  1. @Test
  2. public void testBuildFullHistoryMultipleMatchingIndexes() {
  3. indexdb.createIndexInfo(worldPointsLayer.getName(), "x", IndexType.QUADTREE, null);
  4. indexdb.createIndexInfo(worldPointsLayer.getName(), "y", IndexType.QUADTREE, null);
  5. exception.expect(IllegalStateException.class);
  6. exception.expectMessage(
  7. "Multiple indexes were found for the specified tree, please specify the attribute.");
  8. geogig.command(BuildFullHistoryIndexOp.class)//
  9. .setTreeRefSpec(worldPointsLayer.getName())//
  10. .call();
  11. }

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

  1. private void verifyFeature(Node node) {
  2. ObjectId objectId = node.getObjectId();
  3. assertTrue("feature " + node.getName() + " -> " + objectId + " is not present in objectDb",
  4. objectDb.exists(objectId));
  5. }

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

  1. @Test
  2. public void testBuildFullHistoryNoMatchingIndex() {
  3. indexdb.createIndexInfo(worldPointsLayer.getName(), "x", IndexType.QUADTREE, null);
  4. exception.expect(IllegalStateException.class);
  5. exception.expectMessage("A matching index could not be found.");
  6. geogig.command(BuildFullHistoryIndexOp.class)//
  7. .setTreeRefSpec(worldPointsLayer.getName())//
  8. .setAttributeName("y")//
  9. .call();
  10. }

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

  1. @Test
  2. public void testUpdateNoExistingIndex() {
  3. exception.expect(IllegalArgumentException.class);
  4. exception.expectMessage("A matching index could not be found.");
  5. geogig.command(UpdateIndexOp.class)//
  6. .setTreeRefSpec(worldPointsLayer.getName())//
  7. .setExtraAttributes(Lists.newArrayList("y"))//
  8. .call();
  9. }

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

  1. @Test
  2. public void testBuildFullHistoryNoIndex() {
  3. exception.expect(IllegalStateException.class);
  4. exception.expectMessage("A matching index could not be found.");
  5. geogig.command(BuildFullHistoryIndexOp.class)//
  6. .setTreeRefSpec(worldPointsLayer.getName())//
  7. .call();
  8. }

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

  1. @Test
  2. public void testUpdateIndexOverwriteSameAttribute() {
  3. createIndex("x");
  4. exception.expect(IllegalArgumentException.class);
  5. exception.expectMessage("Nothing to update...");
  6. geogig.command(UpdateIndexOp.class)//
  7. .setTreeRefSpec(worldPointsLayer.getName())//
  8. .setExtraAttributes(Lists.newArrayList("x"))//
  9. .setOverwrite(true)//
  10. .call();
  11. }

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

  1. @Test
  2. public void testUpdateIndexAddSameAttribute() {
  3. createIndex("x", "y");
  4. exception.expect(IllegalArgumentException.class);
  5. exception.expectMessage("Nothing to update...");
  6. geogig.command(UpdateIndexOp.class)//
  7. .setTreeRefSpec(worldPointsLayer.getName())//
  8. .setExtraAttributes(Lists.newArrayList("x"))//
  9. .setAdd(true)//
  10. .call();
  11. }

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

  1. @Test
  2. public void testCreateIndexNoAttributeName() {
  3. exception.expect(IllegalArgumentException.class);
  4. exception.expectMessage("attributeName not provided");
  5. geogig.command(CreateIndexOp.class)//
  6. .setTreeName(worldPointsLayer.getName())//
  7. .setCanonicalTypeTree(worldPointsTree)//
  8. .setFeatureTypeId(worldPointsLayer.getMetadataId().get())//
  9. .setIndexType(IndexType.QUADTREE)//
  10. .call();
  11. }

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

  1. @Test
  2. public void testCreateIndexNoCanonicalTypeTree() {
  3. exception.expect(IllegalArgumentException.class);
  4. exception.expectMessage("canonicalTypeTree not provided");
  5. geogig.command(CreateIndexOp.class)//
  6. .setTreeName(worldPointsLayer.getName())//
  7. .setFeatureTypeId(worldPointsLayer.getMetadataId().get())//
  8. .setAttributeName("geom")//
  9. .setIndexType(IndexType.QUADTREE)//
  10. .call();
  11. }

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

  1. @Test
  2. public void testCreateIndexNoIndexType() {
  3. exception.expect(IllegalArgumentException.class);
  4. exception.expectMessage("indexType not provided");
  5. geogig.command(CreateIndexOp.class)//
  6. .setTreeName(worldPointsLayer.getName())//
  7. .setCanonicalTypeTree(worldPointsTree)//
  8. .setFeatureTypeId(worldPointsLayer.getMetadataId().get())//
  9. .setAttributeName("geom")//
  10. .call();
  11. }
  12. }

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

  1. @Test
  2. public void testCreateIndexNoFeatureTypeId() {
  3. exception.expect(IllegalArgumentException.class);
  4. exception.expectMessage("featureTypeId not provided");
  5. geogig.command(CreateIndexOp.class)//
  6. .setTreeName(worldPointsLayer.getName())//
  7. .setCanonicalTypeTree(worldPointsTree)//
  8. .setAttributeName("geom")//
  9. .setIndexType(IndexType.QUADTREE)//
  10. .call();
  11. }

相关文章