uDIG
  1. uDIG
  2. UDIG-1714

Edit Tools provide a feedback for WFS 1.1 not supported

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: UDIG 1.2.0
    • Fix Version/s: UDIG 1.2.0
    • Component/s: tools and editing
    • Labels:
      None

      Description

      Wfs1.1 is not supported but udig allows create a map using layers from wfs 1.1.0. We can add some feadback like a warning message or disable the editing tools, ....

        Activity

        Hide
        Jody Garnett added a comment -
        I think you mean that wfs 1.1 is read-only access so that the edit tools are not supported. The edit tools should already gray out if a wfs 1.1 layer is selected (as it cannot manage make a FeatureStore).

        Oh wait perhaps the WFSGeoResource canResolve method is not checking what the connection is ... I think I could fix that.
        Show
        Jody Garnett added a comment - I think you mean that wfs 1.1 is read-only access so that the edit tools are not supported. The edit tools should already gray out if a wfs 1.1 layer is selected (as it cannot manage make a FeatureStore). Oh wait perhaps the WFSGeoResource canResolve method is not checking what the connection is ... I think I could fix that.
        Jody Garnett made changes -
        Field Original Value New Value
        Summary Provide a feedback for Wfs1.1 no supported Edit Tools provide a feedback for WFS 1.1 not supported
        Affects Version/s UDIG 1.2.0 [ 16264 ]
        Affects Version/s UDIG 1.2.x [ 15072 ]
        Description Wfs1.1 is not supported but udig allows create a map using layers from wfs 1.1.0. We can add some feadback like a warning message or disable the editing tools, .... Wfs1.1 is not supported but udig allows create a map using layers from wfs 1.1.0. We can add some feadback like a warning message or disable the editing tools, ....
        Hide
        Jody Garnett added a comment -
        Okay the heart of the problem was the WFS implementation not reporting back that FeatureStore was not available:

        Committing a fix now; the heart of the patch is however...

        public <T> boolean canResolve( Class<T> adaptee ) {
                if (adaptee == null){
                    return false;
                }
                if (FeatureStore.class.isAssignableFrom(adaptee)) {
                    if (info != null) {
                        // if info is known we can check if we are writable
                        WFSGeoResourceInfo wfsInfo = (WFSGeoResourceInfo) info;
                        return wfsInfo.isWritable();
                    }
                    if( service.getID().toString().indexOf("1.1.0") != -1){
                        return false; // 1.1.0 not writable yet
                    }
                    else {
                        return true;
                    }
                }
                return (adaptee.isAssignableFrom(IGeoResourceInfo.class)
                        || adaptee.isAssignableFrom(FeatureStore.class)
                        || adaptee.isAssignableFrom(FeatureSource.class)
                        || adaptee.isAssignableFrom(WFSDataStore.class) || adaptee
                        .isAssignableFrom(IService.class))
                        || super.canResolve(adaptee);
            }

        I do note one problem with the above example:
        - FeatureStore.class.isAssignableFrom(adaptee)
        - adaptee.isAssignableFrom(FeatureStore.class)

        Show
        Jody Garnett added a comment - Okay the heart of the problem was the WFS implementation not reporting back that FeatureStore was not available: Committing a fix now; the heart of the patch is however... public <T> boolean canResolve( Class<T> adaptee ) {         if (adaptee == null){             return false;         }         if (FeatureStore.class.isAssignableFrom(adaptee)) {             if (info != null) {                 // if info is known we can check if we are writable                 WFSGeoResourceInfo wfsInfo = (WFSGeoResourceInfo) info;                 return wfsInfo.isWritable();             }             if( service.getID().toString().indexOf("1.1.0") != -1){                 return false; // 1.1.0 not writable yet             }             else {                 return true;             }         }         return (adaptee.isAssignableFrom(IGeoResourceInfo.class)                 || adaptee.isAssignableFrom(FeatureStore.class)                 || adaptee.isAssignableFrom(FeatureSource.class)                 || adaptee.isAssignableFrom(WFSDataStore.class) || adaptee                 .isAssignableFrom(IService.class))                 || super.canResolve(adaptee);     } I do note one problem with the above example: - FeatureStore.class.isAssignableFrom(adaptee) - adaptee.isAssignableFrom(FeatureStore.class)
        Hide
        Jody Garnett added a comment -
        Okay fixed this for postgis and wfs 1.1 / wfs 1.0. This is probably a QA activity that should be done against all implementations?
        Show
        Jody Garnett added a comment - Okay fixed this for postgis and wfs 1.1 / wfs 1.0. This is probably a QA activity that should be done against all implementations?
        Jody Garnett made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s UDIG 1.2.0 [ 16264 ]
        Resolution Fixed [ 1 ]
        Hide
        Jody Garnett added a comment -
        This direct issue (ie wfs 1.1) is sorted.
        Show
        Jody Garnett added a comment - This direct issue (ie wfs 1.1) is sorted.
        Jody Garnett made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Jody Garnett [ jgarnett ]

          People

          • Assignee:
            Jody Garnett
            Reporter:
            Mauricio Pazos
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: