Changeset 3099 for trunk/java-client/org


Ignore:
Timestamp:
2002-04-25T12:41:09+12:00 (22 years ago)
Author:
kjdon
Message:

added support for retrieving filter options. two new classes defined, NzdlFilterOption, a single filter_option, and NzdlFilterOptions, contains a list of options.

Location:
trunk/java-client/org/nzdl/gsdl/service
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-client/org/nzdl/gsdl/service/Makefile

    r2467 r3099  
    2828          NzdlMultiWayWrapper.class \
    2929          NzdlCacheWrapper.class\
    30           NzdlCrossCollectionWrapper.class
     30          NzdlCrossCollectionWrapper.class\
     31    NzdlFilterOptions.class\
     32    NzdlFilterOption.class
    3133
    3234all: $(CLASSFILES)
  • trunk/java-client/org/nzdl/gsdl/service/NzdlLogWrapper.java

    r2278 r3099  
    183183
    184184  /**
     185   * Returns the set of filter options for a particular filter
     186   * @param name the collection name
     187   * @param filter the filter name, eg QueryFilter
     188   * @return an instance of
     189   * {@link NzdlFilterOptions NzdlFilterOptions} containing the filter
     190   * options for a filter
     191   */
     192  public NzdlFilterOptions getFilterOptionSet(String _name, String _filter) {
     193      logBefore("getFilterOptionSet");
     194      NzdlFilterOptions result = super.getFilterOptionSet(_name, _filter);
     195      logAfter("getFilterOptionSet");
     196      return result;
     197  }
     198  /**
    185199   * @param name the collection name
    186200   * @return the Set of (name, value) value pairs for all metadata
  • trunk/java-client/org/nzdl/gsdl/service/NzdlService.java

    r2163 r3099  
    8282  public Set getFilterSet( String collectionName );
    8383
     84    // 24-5-02 kjdon
     85  /**
     86   * Returns the set of filter options for a particular filter
     87   * @param name the collection name
     88   * @param filter the filter name
     89   * @return an instance of
     90   * {@link NzdlFilterOptions NzdlFilterOptions} containing the filter
     91   * options for a filter
     92   */
     93    public NzdlFilterOptions getFilterOptionSet(String _name, String _filter);
     94
    8495  /**
    8596   * Not Currently implemented.
  • trunk/java-client/org/nzdl/gsdl/service/NzdlServiceClient.java

    r2467 r3099  
    220220
    221221  }
     222  // added 24-4-02 kjdon
     223  /**
     224   * Returns the set of filter options for a particular filter
     225   * @param name the collection name
     226   * @param filter the filter name
     227   * @return an instance of
     228   * {@link NzdlFilterOptions NzdlFilterOptions} containing the filter
     229   * options for a filter
     230   */
     231  public NzdlFilterOptions getFilterOptionSet(String _name, String _filter) {
     232    if (_name == null || _name.equals("")){
     233      throw new Error ("null or empty _name");
     234    }
     235    if (_filter == null || _filter.equals("")){
     236      throw new Error ("null or empty _filter");
     237    }
     238    corbaComErrorHolder c_err = NzdlCorbaFactory.createComErrorHolder();
     239    corbatext_t c_name = NzdlCorbaFactory.toCorbaText( _name );
     240    corbatext_t c_filter = NzdlCorbaFactory.toCorbaText( _filter);
     241    corbaFilterOptionsResponseHolder c_options =
     242      NzdlCorbaFactory.createFilterOptionsResponseHolder();
     243
     244    m_nzdlServer.getFilterOptions(c_name, c_filter, c_options, c_err);
     245    if (c_err.value.value() != 0)
     246      System.err.println("getFilterOptionSet() error " + c_err.value.value());
     247    return new NzdlFilterOptions( c_options.value );
     248   
     249  }
    222250
    223251  /**
  • trunk/java-client/org/nzdl/gsdl/service/NzdlWrapper.java

    r2284 r3099  
    104104
    105105  /**
     106   * Returns the set of filter options for a particular filter
     107   * @param name the collection name
     108   * @param filter the filter name
     109   * @return an instance of
     110   * {@link NzdlFilterOptions NzdlFilterOptions} containing the filter
     111   * options for a filter
     112   */
     113    public NzdlFilterOptions getFilterOptionSet(String _name, String _filter){
     114    return service.getFilterOptionSet(_name, _filter);
     115    }
     116
     117  /**
    106118   * Returns the set of filters for the service object.
    107119   * @param name the collection name
Note: See TracChangeset for help on using the changeset viewer.