|
Oracle Application Server Wireless Java API Reference B10400-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.panama.spatial.yp.YPCategory
This class defines a category in the customized hierarchy tree. It has a customized name and a list of references to external YP provider categories. The names of the external categories might be different from the customized local name. The list of external categories is a list of alternatives for where to request data. The content of the customized local category is created from EXACTLY ONE of the external categories references. The external categories are NOT merged. This class defines immutable objects and is thread-safe.
Method Summary | |
static YPCategory |
fromFullyQualifiedName(java.lang.String name) This retrieves a category from its fully qualified name (including names of supercategories). |
YPBusiness[] |
getBusinessesInCity(java.lang.String country, java.lang.String state, java.lang.String city, java.util.Locale locale) This returns all businesses in this category in a specified city |
YPBusiness[] |
getBusinessesInPCode(java.lang.String country, java.lang.String postalCode, java.util.Locale locale) This returns all businesses in this category in a specified postal code |
YPBusiness[] |
getBusinessesInRadius(oracle.panama.spatial.core.PointImpl location, double metersRadius, java.util.Locale locale) This returns all businesses in this category in a specified radius around a specified center point |
YPBusiness[] |
getBusinessesInState(java.lang.String country, java.lang.String state, java.util.Locale locale) This returns all businesses in this category in a specified state |
YPCategory[] |
getCategoriesMatchingName(java.lang.String pattern) This function returns the direct and indirect subcategories of a given category matching a given keyword. |
java.lang.String |
getFullyQualifiedName() This returns the fully qualified name of the category (including names of supercategories). |
java.lang.String |
getName() This returns the name of the category. |
YPCategory |
getParentCategory() This returns the parent-/supercategory |
java.lang.String |
getProviderParameter(java.lang.String name) |
java.util.Iterator |
getProviderParameters(java.lang.String name) |
YPCategory[] |
getSubCategories() This returns all subcategories. |
YPCategory |
getSubCategory(java.lang.String name) This returns a subcategory with a specified name |
boolean |
isLeaf() This returns whether the category is a leaf in the customized hierarchy. |
boolean |
isRoot() This returns whether the category is the root of the customized hierarchy. |
static void |
main(java.lang.String[] args) |
static YPCategory |
readCategoryTree(java.util.HashMap categoriesByID) This reads the local customized category hierarchy from the file YPCategories.xml. |
java.lang.String |
toString() |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public java.lang.String getName()
public java.lang.String getFullyQualifiedName()
public static YPCategory fromFullyQualifiedName(java.lang.String name)
name
- a String representing the namepublic YPCategory[] getCategoriesMatchingName(java.lang.String pattern)
pattern
- a String representing a keyword to look forpublic YPCategory[] getSubCategories()
public YPCategory getSubCategory(java.lang.String name)
public YPCategory getParentCategory()
public YPBusiness[] getBusinessesInCity(java.lang.String country, java.lang.String state, java.lang.String city, java.util.Locale locale)
country
- a String representing the country (must not be null)state
- a String representing the state (must not be null)city
- a String representing the city (must not be null)locale
- a Locale that can affect language, measures of distance, ... (may be null)public YPBusiness[] getBusinessesInState(java.lang.String country, java.lang.String state, java.util.Locale locale)
country
- a String representing the country (must not be null)state
- a String representing the state (must not be null)locale
- a Locale that can affect language, measures of distance, ... (may be null)public YPBusiness[] getBusinessesInRadius(oracle.panama.spatial.core.PointImpl location, double metersRadius, java.util.Locale locale)
location
- a PointImpl representing the center coordinates of the circle (must not be null)metersRadius
- a double representing the radius in meters (must not be null)locale
- a Locale that can affect language, measures of distance, ... (may be null)public YPBusiness[] getBusinessesInPCode(java.lang.String country, java.lang.String postalCode, java.util.Locale locale)
country
- a String representing the country (must not be null)postalCode
- a String representing the postal code (must not be null)locale
- a Locale that can affect language, measures of distance, ... (may be null)public boolean isLeaf()
public boolean isRoot()
public java.lang.String getProviderParameter(java.lang.String name)
public java.util.Iterator getProviderParameters(java.lang.String name)
public static YPCategory readCategoryTree(java.util.HashMap categoriesByID)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
Oracle Application Server Wireless Java API Reference B10400-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |