Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.spatial.yp
Interface YPFinder

All Superinterfaces:
YPFinderSimple

public interface YPFinder
extends YPFinderSimple

This interface defines a service object that can find businesses in a given area that match either a name or category. In contrast to YPFinderSimple, this interface also defines two functions that are independent from the external provider. They are thus only implemented in the managing class YPFinderImpl, not in the provider-specific classes YPFinderImplXXXXX. Any class implementing this interface should be thread-safe.


Method Summary
 YPCategory fromFullyQualifiedName(java.lang.String name)
          This retrieves a category from its fully qualified name (including names of supercategories).
 java.util.Vector getCategoriesByID(java.lang.String providerName, java.lang.String id)
           
 YPCategory[] getCategoriesMatchingName(YPCategory rootOfSearch, java.lang.String pattern)
          This function returns the direct and indirect subcategories of a given category matching a given keyword.
 YPCategory getCategoryAtPath(java.lang.String[] categoriesOnPath)
          This returns the category at the specified path from the root of the customized local hierarchy.
 YPCategory getCategoryAtRoot()
          This returns the category at the root of the customized local hierarchy.
 YPCategory getCategoryByID(java.lang.String providerName, java.lang.String id)
           
 YPCategory getParentCategory(YPCategory category)
          This returns the parent-/supercategory of a given category.
 YPCategory[] getSubCategories(YPCategory category)
          This returns all subcategories of a given category.
 YPCategory getSubCategory(YPCategory category, java.lang.String name)
          This returns a category subcategory with a specified name.

 

Methods inherited from interface oracle.panama.spatial.yp.YPFinderSimple
anyBusinessesInCity, anyBusinessesInPCode, anyBusinessesInRadius, anyBusinessesInSameCity, anyBusinessesInSamePCode, anyBusinessesInSameState, anyBusinessesInState, getBusinessesAnywhere, getBusinessesAnywhere, getBusinessesAnywhere, getBusinessesInCity, getBusinessesInCity, getBusinessesInCity, getBusinessesInCorridor, getBusinessesInCorridor, getBusinessesInCorridor, getBusinessesInPCode, getBusinessesInPCode, getBusinessesInPCode  

Method Detail

getCategoryAtRoot

public YPCategory getCategoryAtRoot()
This returns the category at the root of the customized local hierarchy. This function IS NOT TO BE implemented by any provider proxy. It is performed by the framework itself and translated to other functions.
Returns:
a YPCategory object representing the category at the root of the hierarchy

getCategoryAtPath

public YPCategory getCategoryAtPath(java.lang.String[] categoriesOnPath)
This returns the category at the specified path from the root of the customized local hierarchy. This function IS NOT TO BE implemented by any provider proxy. It is performed by the framework itself and translated to other functions.
Parameters:
categoriesOnPath - an array of String representing the names of categories along the path to the requested category (must not be null)
Returns:
a YPCategory object representing the category at the specified path

getCategoryByID

public YPCategory getCategoryByID(java.lang.String providerName,
                                  java.lang.String id)

getCategoriesByID

public java.util.Vector getCategoriesByID(java.lang.String providerName,
                                          java.lang.String id)

getParentCategory

public YPCategory getParentCategory(YPCategory category)
This returns the parent-/supercategory of a given category. This function simply calls the respective function in the class YPCategory (on parameter category). Its replication in this interface simply serves convenience.
Parameters:
category - a YPCategory object representing the category for which to return the parent
Returns:
a YPCategory representing the parent category (null if this category is the root)

getSubCategories

public YPCategory[] getSubCategories(YPCategory category)
This returns all subcategories of a given category. This function simply calls the respective function in the class YPCategory (on parameter category). Its replication in this interface simply serves convenience.
Parameters:
category - a YPCategory object representing the category for which to return the subcategories
Returns:
an array of YPCategory representing all subcategories

getSubCategory

public YPCategory getSubCategory(YPCategory category,
                                 java.lang.String name)
This returns a category subcategory with a specified name. This function simply calls the respective function in the class YPCategory (on parameter category). Its replication in this interface simply serves convenience.
Parameters:
category - a YPCategory object representing the category for which to return the subcategory
Returns:
a YPCategory representing the requested subcategory (must not be null)

getCategoriesMatchingName

public YPCategory[] getCategoriesMatchingName(YPCategory rootOfSearch,
                                              java.lang.String pattern)
This function returns the direct and indirect subcategories of a given category matching a given keyword. This function simply calls the respective function in the class YPCategory (on parameter rootOfSearch). Its replication in this interface simply serves convenience.
Parameters:
rootOfSearch - A YPCategory object representing the category where to start the search. Only (direct or indirect) subcategories will be searched.
pattern - a String representing a keyword to look for
Returns:
an array of YPCategory representing the matching subcategories (direct and indirect)

fromFullyQualifiedName

public YPCategory fromFullyQualifiedName(java.lang.String name)
This retrieves a category from its fully qualified name (including names of supercategories). This function simply calls the respective static function in the class YPCategory. Its replication in this interface simply serves convenience.
Parameters:
name - a String representing the name
Returns:
the YPCategory represented by the given name

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.