.setAttributeName(geometryAttributeName)//
index = repo.command(UpdateIndexOp.class)// .setAttributeName(attribute)//
index = repo.command(UpdateIndexOp.class)// .setAttributeName(attribute)//
@Test public void testUpdateNoMatchingIndex() { indexdb.createIndexInfo(worldPointsLayer.getName(), "x", IndexType.QUADTREE, null); exception.expect(IllegalArgumentException.class); exception.expectMessage("A matching index could not be found."); geogig.command(UpdateIndexOp.class)// .setTreeRefSpec(worldPointsLayer.getName())// .setAttributeName("y")// .call(); }
.setAttributeName("geom")// .setExtraAttributes(Lists.newArrayList("x", "y"))// .setAdd(true)//
.setAttributeName("geom")// .setExtraAttributes(Lists.newArrayList("x", "y"))// .setAdd(true)//
@Test public void testUpdateNoMatchingIndex() { indexdb.createIndexInfo(worldPointsLayer.getName(), "x", IndexType.QUADTREE, null); exception.expect(IllegalStateException.class); exception.expectMessage("A matching index could not be found."); geogig.command(UpdateIndexOp.class)// .setTreeRefSpec(worldPointsLayer.getName())// .setAttributeName("y")// .call(); }
@Override protected void runInternal(GeogigCLI cli) throws InvalidParameterException, CommandFailedException, IOException { Repository repo = cli.getGeogig().getRepository(); Envelope envelope = SpatialOps.parseNonReferencedBBOX(bbox); Index index = repo.command(UpdateIndexOp.class)// .setTreeRefSpec(treeRefSpec)// .setAttributeName(attribute)// .setExtraAttributes(extraAttributes)// .setOverwrite(overwrite)// .setAdd(add)// .setIndexHistory(indexHistory)// .setBounds(envelope)// .setProgressListener(cli.getProgressListener())// .call(); if (cli.getProgressListener().isCanceled()) { cli.getConsole().println("Index update cancelled."); } else { cli.getConsole().println( "Index updated successfully: " + index.indexTreeId().toString().substring(0, 8)); } } }