本文整理了Java中org.locationtech.geogig.model.Node.getName()
方法的一些代码示例,展示了Node.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getName()
方法的具体详情如下:
包路径:org.locationtech.geogig.model.Node
类名称:Node
方法名:getName
暂无
代码示例来源:origin: locationtech/geogig
/**
* @return the simple name of the {@link Node} this object points to
*/
public String name() {
return node.getName();
}
代码示例来源:origin: locationtech/geogig
/**
* @see CanonicalNodeNameOrder#bucket(String, int)
*/
public int bucket(final Node ref, final int depth) {
return CanonicalNodeNameOrder.bucket(ref.getName(), depth);
}
}
代码示例来源:origin: locationtech/geogig
/**
* @return a {@link NodeId} whose {@link NodeId#value() value} is the node's
* {@link Node#bounds() bounds} {@link Envelope} or {@code null}
*/
@Override
public NodeId computeId(final Node node) {
@Nullable
Envelope bounds = node.bounds().orNull();
return new NodeId(node.getName(), bounds);
}
代码示例来源:origin: locationtech/geogig
private void asMap(String parentPath, TreeMap<String, MutableTree> target) {
for (MutableTree childTree : this.childTrees.values()) {
String childTreePath = NodeRef.appendChild(parentPath, childTree.getNode().getName());
target.put(childTreePath, childTree);
childTree.asMap(childTreePath, target);
}
}
代码示例来源:origin: org.locationtech.geogig/geogig-core
@Override
public MutableTree clone() {
MutableTree clone = new MutableTree(node);
for (MutableTree child : this.childTrees.values()) {
clone.childTrees.put(child.getNode().getName(), child.clone());
}
return clone;
}
}
代码示例来源:origin: locationtech/geogig
@Override
public MutableTree clone() {
MutableTree clone = new MutableTree(node);
for (MutableTree child : this.childTrees.values()) {
clone.childTrees.put(child.getNode().getName(), child.clone());
}
return clone;
}
}
代码示例来源:origin: locationtech/geogig
private IndexInfo createIndex(@Nullable String... extraAttributes) {
Map<String, Object> metadata = new HashMap<>();
metadata.put(IndexInfo.MD_QUAD_MAX_BOUNDS, new Envelope(-180, 180, -90, 90));
if (extraAttributes != null && extraAttributes.length > 0) {
metadata.put(IndexInfo.FEATURE_ATTRIBUTES_EXTRA_DATA, extraAttributes);
}
IndexInfo indexInfo;
indexInfo = indexdb.createIndexInfo(worldPointsLayer.getName(), "geom", IndexType.QUADTREE,
metadata);
return indexInfo;
}
代码示例来源:origin: org.locationtech.geogig/geogig-core
private void verifyMetadata(Node node) {
if (node.getMetadataId().isPresent()) {
ObjectId mdId = node.getMetadataId().get();
String msg = "RevFeatureType " + mdId + " is not present (from " + node.getName() + ")";
assertTrue(msg, objectDb.exists(mdId));
}
}
代码示例来源:origin: locationtech/geogig
@Test
public void testUpdateMultipleMatchingIndexes() {
indexdb.createIndexInfo(worldPointsLayer.getName(), "x", IndexType.QUADTREE, null);
indexdb.createIndexInfo(worldPointsLayer.getName(), "y", IndexType.QUADTREE, null);
exception.expect(IllegalArgumentException.class);
exception.expectMessage(
"Multiple indexes were found for the specified tree, please specify the attribute.");
geogig.command(UpdateIndexOp.class)//
.setTreeRefSpec(worldPointsLayer.getName())//
.call();
}
代码示例来源:origin: locationtech/geogig
@Test
public void testBuildFullHistoryMultipleMatchingIndexes() {
indexdb.createIndexInfo(worldPointsLayer.getName(), "x", IndexType.QUADTREE, null);
indexdb.createIndexInfo(worldPointsLayer.getName(), "y", IndexType.QUADTREE, null);
exception.expect(IllegalStateException.class);
exception.expectMessage(
"Multiple indexes were found for the specified tree, please specify the attribute.");
geogig.command(BuildFullHistoryIndexOp.class)//
.setTreeRefSpec(worldPointsLayer.getName())//
.call();
}
代码示例来源:origin: locationtech/geogig
private void verifyFeature(Node node) {
ObjectId objectId = node.getObjectId();
assertTrue("feature " + node.getName() + " -> " + objectId + " is not present in objectDb",
objectDb.exists(objectId));
}
代码示例来源:origin: org.locationtech.geogig/geogig-core
@Test
public void testBuildFullHistoryNoMatchingIndex() {
indexdb.createIndexInfo(worldPointsLayer.getName(), "x", IndexType.QUADTREE, null);
exception.expect(IllegalStateException.class);
exception.expectMessage("A matching index could not be found.");
geogig.command(BuildFullHistoryIndexOp.class)//
.setTreeRefSpec(worldPointsLayer.getName())//
.setAttributeName("y")//
.call();
}
代码示例来源:origin: locationtech/geogig
@Test
public void testUpdateNoExistingIndex() {
exception.expect(IllegalArgumentException.class);
exception.expectMessage("A matching index could not be found.");
geogig.command(UpdateIndexOp.class)//
.setTreeRefSpec(worldPointsLayer.getName())//
.setExtraAttributes(Lists.newArrayList("y"))//
.call();
}
代码示例来源:origin: org.locationtech.geogig/geogig-core
@Test
public void testBuildFullHistoryNoIndex() {
exception.expect(IllegalStateException.class);
exception.expectMessage("A matching index could not be found.");
geogig.command(BuildFullHistoryIndexOp.class)//
.setTreeRefSpec(worldPointsLayer.getName())//
.call();
}
代码示例来源:origin: locationtech/geogig
@Test
public void testUpdateIndexOverwriteSameAttribute() {
createIndex("x");
exception.expect(IllegalArgumentException.class);
exception.expectMessage("Nothing to update...");
geogig.command(UpdateIndexOp.class)//
.setTreeRefSpec(worldPointsLayer.getName())//
.setExtraAttributes(Lists.newArrayList("x"))//
.setOverwrite(true)//
.call();
}
代码示例来源:origin: locationtech/geogig
@Test
public void testUpdateIndexAddSameAttribute() {
createIndex("x", "y");
exception.expect(IllegalArgumentException.class);
exception.expectMessage("Nothing to update...");
geogig.command(UpdateIndexOp.class)//
.setTreeRefSpec(worldPointsLayer.getName())//
.setExtraAttributes(Lists.newArrayList("x"))//
.setAdd(true)//
.call();
}
代码示例来源:origin: locationtech/geogig
@Test
public void testCreateIndexNoAttributeName() {
exception.expect(IllegalArgumentException.class);
exception.expectMessage("attributeName not provided");
geogig.command(CreateIndexOp.class)//
.setTreeName(worldPointsLayer.getName())//
.setCanonicalTypeTree(worldPointsTree)//
.setFeatureTypeId(worldPointsLayer.getMetadataId().get())//
.setIndexType(IndexType.QUADTREE)//
.call();
}
代码示例来源:origin: locationtech/geogig
@Test
public void testCreateIndexNoCanonicalTypeTree() {
exception.expect(IllegalArgumentException.class);
exception.expectMessage("canonicalTypeTree not provided");
geogig.command(CreateIndexOp.class)//
.setTreeName(worldPointsLayer.getName())//
.setFeatureTypeId(worldPointsLayer.getMetadataId().get())//
.setAttributeName("geom")//
.setIndexType(IndexType.QUADTREE)//
.call();
}
代码示例来源:origin: locationtech/geogig
@Test
public void testCreateIndexNoIndexType() {
exception.expect(IllegalArgumentException.class);
exception.expectMessage("indexType not provided");
geogig.command(CreateIndexOp.class)//
.setTreeName(worldPointsLayer.getName())//
.setCanonicalTypeTree(worldPointsTree)//
.setFeatureTypeId(worldPointsLayer.getMetadataId().get())//
.setAttributeName("geom")//
.call();
}
}
代码示例来源:origin: locationtech/geogig
@Test
public void testCreateIndexNoFeatureTypeId() {
exception.expect(IllegalArgumentException.class);
exception.expectMessage("featureTypeId not provided");
geogig.command(CreateIndexOp.class)//
.setTreeName(worldPointsLayer.getName())//
.setCanonicalTypeTree(worldPointsTree)//
.setAttributeName("geom")//
.setIndexType(IndexType.QUADTREE)//
.call();
}
内容来源于网络,如有侵权,请联系作者删除!