Uploaded image for project: 'Medici'
  1. Medici
  2. MMDB-382

Unifier not working

XMLWordPrintableJSON

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major Major
    • 0.3
    • None
    • Web application
    • None

      For some reason the following unifier is not working anymore

      Unifier u = new Unifier();
      u.setColumnNames( "tile" ); //$NON-NLS-1$
      u.addPattern( uri, ImagePyramidTileBeanUtil.PYRAMID_TILES, "tile" ); //$NON-NLS-1$ //$NON-NLS-2$
      u.addPattern( "tile", ImagePyramidTileBeanUtil.PYRAMIDTILE_LEVEL, Resource.literal( level ) ); //$NON-NLS-1$
      u.addPattern( "tile", ImagePyramidTileBeanUtil.PYRAMIDTILE_ROW, Resource.literal( row ) ); //$NON-NLS-1$
      u.addPattern( "tile", ImagePyramidTileBeanUtil.PYRAMIDTILE_COL, Resource.literal( col ) ); //$NON-NLS-1$
      TupeloStore.getInstance().getContext().perform( u );
      for ( Tuple<Resource> r : u.getResult() )

      { return r.get( 0 ); }

      throw new NotFoundException( "no tile found" );

      it will return an empty set, however the following one (using the same level, row, col) will return results.

      Resource rl = Resource.literal( level );
      Resource rr = Resource.literal( row );
      Resource rc = Resource.literal( col );
      Unifier u = new Unifier();
      u.setColumnNames( "tile", "level", "row", "col" ); //$NON-NLS-1$
      u.addPattern( uri, ImagePyramidTileBeanUtil.PYRAMID_TILES, "tile" ); //$NON-NLS-1$
      u.addPattern( "tile", ImagePyramidTileBeanUtil.PYRAMIDTILE_LEVEL, "level" ); //$NON-NLS-1$
      u.addPattern( "tile", ImagePyramidTileBeanUtil.PYRAMIDTILE_ROW, "row" ); //$NON-NLS-1$
      u.addPattern( "tile", ImagePyramidTileBeanUtil.PYRAMIDTILE_COL, "col" ); //$NON-NLS-1$
      TupeloStore.getInstance().getContext().perform( u );
      for ( Tuple<Resource> r : u.getResult() ) {
      if (rl.equals( r.get(1)) && rr.equals( r.get(2)) && rc.equals( r.get(3) ) )

      { return r.get( 0 ); }

      }
      throw new NotFoundException( "no tile found" );

              Unassigned Unassigned
              kooper Rob Kooper
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: