Package org.locationtech.geogig.api

Examples of org.locationtech.geogig.api.RevFeatureType.type()


                Preconditions.checkState(ourFeatureType != null || theirFeatureType != null);

                SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(
                        (SimpleFeatureType) (ourFeatureType != null ? ourFeatureType.type()
                                : theirFeatureType.type()));

                ImmutableList<PropertyDescriptor> descriptors = (ourFeatureType == null ? theirFeatureType
                        : ourFeatureType).sortedDescriptors();

                for (Entry<String, JsonElement> entry : merges.entrySet()) {
View Full Code Here


        Optional<RevObject> revObject = cli.getGeogig().command(RevObjectParse.class)
                .setObjectId(featureTypeTree.get().getMetadataId()).call();
        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
View Full Code Here

        Optional<RevObject> revObject = cli.getGeogig().command(RevObjectParse.class)
                .setObjectId(featureTypeTree.get().getMetadataId()).call();
        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
        } else {
View Full Code Here

        Optional<RevObject> revObject = cli.getGeogig().command(RevObjectParse.class)
                .setObjectId(featureTypeTree.get().getMetadataId()).call();
        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
View Full Code Here

        Optional<RevObject> revObject = cli.getGeogig().command(RevObjectParse.class)
                .setObjectId(featureTypeTree.get().getMetadataId()).call();
        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
        } else {
View Full Code Here

        Optional<RevObject> revObject = cli.getGeogig().command(RevObjectParse.class)
                .setObjectId(featureTypeTree.get().getMetadataId()).call();
        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
View Full Code Here

        Optional<RevObject> revObject = cli.getGeogig().command(RevObjectParse.class)
                .setObjectId(featureTypeTree.get().getMetadataId()).call();
        if (revObject.isPresent() && revObject.get() instanceof RevFeatureType) {
            RevFeatureType revFeatureType = (RevFeatureType) revObject.get();
            if (revFeatureType.type() instanceof SimpleFeatureType) {
                return (SimpleFeatureType) revFeatureType.type();
            } else {
                throw new InvalidParameterException(
                        "Cannot find feature type for the specified path");
            }
        } else {
View Full Code Here

        assertEquals("", treeRef.getParentPath());
        assertTrue(treeRef.getNode().getMetadataId().isPresent());
        assertSame(treeRef.getMetadataId(), treeRef.getNode().getMetadataId().get());

        RevFeatureType featureType = repo.stagingDatabase().getFeatureType(treeRef.getMetadataId());
        assertEquals(pointsType, featureType.type());
    }

    @Test
    public void testCreateTypeNestedNonExistingParent() throws Exception {
        NodeRef treeRef = workTree.createTypeTree("path/to/nested/type", pointsType);
View Full Code Here

        assertEquals("path/to/nested", treeRef.getParentPath());
        assertTrue(treeRef.getNode().getMetadataId().isPresent());
        assertSame(treeRef.getMetadataId(), treeRef.getNode().getMetadataId().get());

        RevFeatureType featureType = repo.stagingDatabase().getFeatureType(treeRef.getMetadataId());
        assertEquals(pointsType, featureType.type());
    }

    @Test
    public void testCreateTypeTreeAutomaticallyWhenInsertingWitNoExistingTypeTree()
            throws Exception {
View Full Code Here

        assertTrue(treeRef.get().getNode().getMetadataId().isPresent());
        assertFalse(treeRef.get().getNode().getMetadataId().get().isNull());

        RevFeatureType featureType = repo.stagingDatabase().getFeatureType(
                treeRef.get().getMetadataId());
        assertEquals(pointsType, featureType.type());

    }

    @Test
    public void testInsertFeatureWithNonDefaultFeatureType() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.