Examples of sortedDescriptors()


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

            RevFeatureType newRevFeatureType = getFeatureType(diff, feature, oldRevFeatureType);
            ImmutableList<Optional<Object>> values = feature.getValues();
            ImmutableList<PropertyDescriptor> oldDescriptors = oldRevFeatureType
                    .sortedDescriptors();
            ImmutableList<PropertyDescriptor> newDescriptors = newRevFeatureType
                    .sortedDescriptors();
            SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(
                    (SimpleFeatureType) newRevFeatureType.type());
            Map<Name, Optional<?>> attrs = Maps.newHashMap();
            for (int i = 0; i < oldDescriptors.size(); i++) {
View Full Code Here

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

        RevFeature oldFeature = command(RevObjectParse.class).setObjectId(node.objectId())
                .call(RevFeature.class).get();
        RevFeatureType oldFeatureType;
        oldFeatureType = command(RevObjectParse.class).setObjectId(node.getMetadataId())
                .call(RevFeatureType.class).get();
        ImmutableList<PropertyDescriptor> oldAttributes = oldFeatureType.sortedDescriptors();
        ImmutableList<PropertyDescriptor> newAttributes = featureType.sortedDescriptors();
        ImmutableList<Optional<Object>> oldValues = oldFeature.getValues();
        List<Optional<Object>> newValues = Lists.newArrayList();
        for (int i = 0; i < newAttributes.size(); i++) {
            int idx = oldAttributes.indexOf(newAttributes.get(i));
View Full Code Here

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

                        .call(RevFeature.class).get();
                RevFeatureType revFeatureType = command(RevObjectParse.class)
                        .setObjectId(ref.getMetadataId()).call(RevFeatureType.class).get();
                SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(
                        (SimpleFeatureType) revFeatureType.type());
                ImmutableList<PropertyDescriptor> descriptors = revFeatureType.sortedDescriptors();
                ImmutableList<Optional<Object>> values = revFeature.getValues();
                for (int i = 0; i < descriptors.size(); i++) {
                    PropertyDescriptor descriptor = descriptors.get(i);
                    Optional<Object> value = values.get(i);
                    featureBuilder.set(descriptor.getName(), value.orNull());
View Full Code Here

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

                }

                final RevFeature oldFeature;
                oldFeature = (RevFeature) input.getUserData().get(RevFeature.class);

                ImmutableList<PropertyDescriptor> oldAttributes = oldFeatureType
                        .sortedDescriptors();
                ImmutableList<PropertyDescriptor> newAttributes = targetType.sortedDescriptors();

                ImmutableList<Optional<Object>> oldValues = oldFeature.getValues();
                List<Optional<Object>> newValues = Lists.newArrayList();
View Full Code Here

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

                            .setObjectId(noderef.getMetadataId()).call(RevFeatureType.class).get();
                    Optional<RevObject> obj = geogig.command(RevObjectParse.class)
                            .setObjectId(noderef.objectId()).call();
                    RevFeature feature = (RevFeature) obj.get();
                    ImmutableList<Optional<Object>> values = feature.getValues();
                    ImmutableList<PropertyDescriptor> descriptors = featureType.sortedDescriptors();
                    int idx = 0;
                    for (PropertyDescriptor descriptor : descriptors) {
                        if (diffs.containsKey(descriptor)) {
                            AttributeDiff ad = diffs.get(descriptor);
                            sb.append(ad.getType().toString().charAt(0) + " "
View Full Code Here

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

                    ImmutableList<Optional<Object>> values = feature.getValues();
                    int i = 0;
                    for (Optional<Object> value : values) {
                        sb.append(diffEntry.changeType().toString().charAt(0));
                        sb.append(' ');
                        sb.append(featureType.sortedDescriptors().get(i).getName().toString());
                        sb.append(LINE_BREAK);
                        sb.append(TextValueSerializer.asString(value));
                        sb.append(LINE_BREAK);
                        i++;
                    }
View Full Code Here

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

                    .setObjectId(noderef.objectId()).call();
            RevFeature feature = (RevFeature) obj.get();
            ImmutableList<Optional<Object>> values = feature.getValues();
            int i = 0;
            for (Optional<Object> value : values) {
                console.println(featureType.sortedDescriptors().get(i).getName() + "\t"
                        + TextValueSerializer.asString(value));

                i++;
            }
            console.println();
View Full Code Here

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

                    Optional<NodeRef> noderef = depthSearch
                            .find(this.workingTree().getTree(), path);
                    RevFeatureType featureType = command(RevObjectParse.class)
                            .setObjectId(noderef.get().getMetadataId()).call(RevFeatureType.class)
                            .get();
                    ImmutableList<PropertyDescriptor> descriptors = featureType.sortedDescriptors();
                    FeatureDiff featureDiff = command(DiffFeature.class)
                            .setOldVersion(Suppliers.ofInstance(diff.getOldObject()))
                            .setNewVersion(Suppliers.ofInstance(diff.getNewObject())).call();
                    Set<Entry<PropertyDescriptor, AttributeDiff>> attrDiffs = featureDiff
                            .getDiffs().entrySet();
View Full Code Here

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

        if (!diff.getNewFeatureType().equals(ObjectId.NULL)
                && !diff.getOldFeatureType().equals(ObjectId.NULL)) {
            RevFeatureType oldFeatureType = getFeatureTypeFromId(diff.getOldFeatureType()).get();
            RevFeatureType newFeatureType = getFeatureTypeFromId(diff.getNewFeatureType()).get();
            ImmutableList<PropertyDescriptor> oldDescriptors = oldFeatureType.sortedDescriptors();
            ImmutableList<PropertyDescriptor> newDescriptors = newFeatureType.sortedDescriptors();
            BitSet updatedDescriptors = new BitSet(newDescriptors.size());
            for (int i = 0; i < oldDescriptors.size(); i++) {
                PropertyDescriptor oldDescriptor = oldDescriptors.get(i);
                int idx = newDescriptors.indexOf(oldDescriptor);
                if (idx != -1) {
View Full Code Here

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

            RevFeature feature = (RevFeature) obj.get();
            DepthSearch depthSearch = new DepthSearch(stagingDatabase());
            Optional<NodeRef> noderef = depthSearch.find(workingTree().getTree(), path);
            RevFeatureType featureType = command(RevObjectParse.class)
                    .setObjectId(noderef.get().getMetadataId()).call(RevFeatureType.class).get();
            ImmutableList<PropertyDescriptor> descriptors = featureType.sortedDescriptors();
            Set<Entry<PropertyDescriptor, AttributeDiff>> attrDiffs = diff.getDiffs().entrySet();
            boolean ok = true;
            for (Iterator<Entry<PropertyDescriptor, AttributeDiff>> iterator = attrDiffs.iterator(); iterator
                    .hasNext();) {
                Entry<PropertyDescriptor, AttributeDiff> entry = iterator.next();
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.