Skip navigation links

Oracle® Ultra Search Java API Reference
11g Release 1 (11.1)

B28329-02


oracle.ultrasearch.query
Class InstanceMetaData

java.lang.Object
  extended by oracle.ultrasearch.query.InstanceMetaData


public class InstanceMetaData
extends java.lang.Object

Class InstanceMetaData provides comprehensive information about an instance: attributes, groups, lovs, languages and display names.

Since:
9.0.2

Method Summary
 Attribute getAttribute(int id)
          Get an attribute using an attribute ID.
 Attribute getAttribute(java.lang.String uniqueName)
          Get an attribute using the unique attribute naming scheme.
 Attribute getAttribute(java.lang.String name, java.lang.Class type)
          Get an attribute from Ultra Search using an attribute name (not display name), and type
 java.util.Collection getAttributes()
          Get all attributes defined in this instance.
 java.util.Collection getAttributesIntersect(Group[] grps)
          Get the attributes available in a set of data group by finding the intersection of each group's attributes.
 java.util.Collection getAttributesUnion(Group[] grps)
          Get the attributes available in a set of data groups by finding the union of each group's attributes.
 DateAttribute getDateAttribute(java.lang.String name)
          Get a date attribute from Ultra Search using an attribute name (not display name).
 java.lang.String getDisplayName(Attribute att, java.util.Locale loc)
          Get the display name for an Attribute.
 java.lang.String getDisplayName(Attribute att, java.util.Locale loc, boolean fallback)
          Get the display name for an Attribute, using a lookup method that starts with one specific locale, then progressively fallbacks to more general locales.
 java.lang.String getDisplayName(Group grp, java.util.Locale loc)
          Get the display name for a Group.
 java.lang.String getDisplayName(Group grp, java.util.Locale loc, boolean fallback)
          Get the display name for a Group, using a lookup method that starts with one specific locale, then progressively fallbacks to more general locales.
 java.lang.String getDisplayName(java.util.Locale lang, java.util.Locale loc)
          Get the display name for a language locale.
 Group getGroup(int gid)
          Get a group using its ID.
 Group getGroup(java.lang.String gname)
          Get a group using its name.
 java.util.Collection getGroups()
          Get all the groups defined in the instance.
 Instance getInstance()
          get the Instance object that created this instance meta data.
 java.util.Collection getLanguages()
          Get all the searchable languages defined in this instance.
 AttributeLOV getLOVDefault(Attribute att, java.util.Locale loc)
          Get the attribute LOV available for this attribute.
 AttributeLOV getLOVDefault(Attribute att, java.util.Locale loc, boolean fallback)
          Get the attribute LOV available for this attribute.
 AttributeLOV getLOVIntersect(Attribute att, Group[] groups, java.util.Locale loc)
          Get the attribute LOV available for this set of groups by finding the intersection of the individual group's LOV.
 AttributeLOV getLOVIntersect(Attribute att, Group[] groups, java.util.Locale loc, boolean fallback)
          Get the attribute LOV available for this set of groups by finding the intersection of the individual group's LOV.
 AttributeLOV getLOVUnion(Attribute att, Group[] groups, java.util.Locale loc)
          Get the attribute LOV available for this set of groups by finding the union of the individual group's LOV.
 AttributeLOV getLOVUnion(Attribute att, Group[] groups, java.util.Locale loc, boolean fallback)
          Get the attribute LOV available for this set of groups by finding the union of the individual group's LOV.
 NumberAttribute getNumberAttribute(java.lang.String name)
          Get a number attribute from Ultra Search using an attribute name (not display name).
 StringAttribute getStringAttribute(java.lang.String name)
          Get a string attribute from Ultra Search using an attribute name (not display name).

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

getInstance

public Instance getInstance()
get the Instance object that created this instance meta data.
Returns:
an instance object

getGroups

public java.util.Collection getGroups()
Get all the groups defined in the instance.
Returns:
a collection of group objects

getGroup

public Group getGroup(int gid)
Get a group using its ID.
Parameters:
gid - group ID
Returns:
a group object, null if no group has this gid

getGroup

public Group getGroup(java.lang.String gname)
Get a group using its name.
Parameters:
gname - group name
Returns:
a group object, null if no group has this name

getLanguages

public java.util.Collection getLanguages()
Get all the searchable languages defined in this instance.
Returns:
a collection of language objects

getAttributes

public java.util.Collection getAttributes()
Get all attributes defined in this instance.
Returns:
a collection of attribute objects

getAttribute

public Attribute getAttribute(java.lang.String uniqueName)
Get an attribute using the unique attribute naming scheme. An unique attribute name is synthesized by concatenating the attribute name with the attribute type, using an underscore.
For example: a StringAttribute named "A" is uniquely identified by "A_STRING". Likewise for NumberAttribute and DateAttribute: "A_NUMBER", "A_DATE".
Parameters:
uniqueName - an unique name for an attribute.
Returns:
the attribute referred to by the uniqueName, null if not found

getAttribute

public Attribute getAttribute(int id)
Get an attribute using an attribute ID.
Returns:
the attribute with corresponding ID, null if not found

getAttribute

public Attribute getAttribute(java.lang.String name,
                              java.lang.Class type)
Get an attribute from Ultra Search using an attribute name (not display name), and type
Parameters:
name - the attribute name
type - the attribute's type/class, for example StringAttribute.TYPE
Returns:
the attribute with corresponding name, null if not found

getStringAttribute

public StringAttribute getStringAttribute(java.lang.String name)
Get a string attribute from Ultra Search using an attribute name (not display name).
Returns:
the string attribute with corresponding name, null if not found

getNumberAttribute

public NumberAttribute getNumberAttribute(java.lang.String name)
Get a number attribute from Ultra Search using an attribute name (not display name).
Returns:
the number attribute with corresponding name, null if not found

getDateAttribute

public DateAttribute getDateAttribute(java.lang.String name)
Get a date attribute from Ultra Search using an attribute name (not display name).
Returns:
the date attribute with corresponding name, null if not found

getAttributesUnion

public java.util.Collection getAttributesUnion(Group[] grps)
Get the attributes available in a set of data groups by finding the union of each group's attributes.
Parameters:
grps - an array of groups
Returns:
a collection of attributes

getAttributesIntersect

public java.util.Collection getAttributesIntersect(Group[] grps)
Get the attributes available in a set of data group by finding the intersection of each group's attributes.
Parameters:
grps - an array of groups
Returns:
a collection of attributes

getLOVDefault

public AttributeLOV getLOVDefault(Attribute att,
                                  java.util.Locale loc)
Get the attribute LOV available for this attribute. The default LOV is defined by the Ultra Search administrator. same as calling getLOVDefault(att, loc, true)
Parameters:
att - the attribute for the LOV requested
loc - the locale for display names
Returns:
an AttributeLOV object

getLOVDefault

public AttributeLOV getLOVDefault(Attribute att,
                                  java.util.Locale loc,
                                  boolean fallback)
Get the attribute LOV available for this attribute. The default LOV is defined by the Ultra Search administrator.
Parameters:
att - the attribute for the LOV requested
loc - the locale for display names
fallback - true to use the fallback lookup method false to use single lookup using loc
Returns:
an AttributeLOV object
Since:
9.0.4

getLOVUnion

public AttributeLOV getLOVUnion(Attribute att,
                                Group[] groups,
                                java.util.Locale loc)
Get the attribute LOV available for this set of groups by finding the union of the individual group's LOV. same as calling getLOVUnion (att, groups, loc, true)
Parameters:
att - the attribute for the LOV requested
groups[] - an array of groups
loc - the locale for display names

getLOVUnion

public AttributeLOV getLOVUnion(Attribute att,
                                Group[] groups,
                                java.util.Locale loc,
                                boolean fallback)
Get the attribute LOV available for this set of groups by finding the union of the individual group's LOV.
Parameters:
att - the attribute for the LOV requested
groups[] - an array of groups
loc - the locale for display names
fallback - true to use the fallback lookup method false to use single lookup using loc
Since:
9.0.4

getLOVIntersect

public AttributeLOV getLOVIntersect(Attribute att,
                                    Group[] groups,
                                    java.util.Locale loc)
Get the attribute LOV available for this set of groups by finding the intersection of the individual group's LOV. same as calling getLOVIntersect (att, groups, loc, true)
Parameters:
att - the attribute for the LOV requested
loc - the locale for display names
groups[] - an array of groups

getLOVIntersect

public AttributeLOV getLOVIntersect(Attribute att,
                                    Group[] groups,
                                    java.util.Locale loc,
                                    boolean fallback)
Get the attribute LOV available for this set of groups by finding the intersection of the individual group's LOV.
Parameters:
att - the attribute for the LOV requested
loc - the locale for display names
groups[] - an array of groups
fallback - true to use the fallback lookup method false to use single lookup using loc
Since:
9.0.4

getDisplayName

public java.lang.String getDisplayName(java.util.Locale lang,
                                       java.util.Locale loc)
Get the display name for a language locale. Similar to lang.getDisplayName(loc). only with more display names than JDK's default.
Parameters:
lang - locale of the language, not null
loc - locale of the display name, not null
Returns:
language display name, null if none is available
Since:
9.0.4

getDisplayName

public java.lang.String getDisplayName(Attribute att,
                                       java.util.Locale loc)
Get the display name for an Attribute. Same as calling getDisplayName (att, loc, true)
Parameters:
att - an attribute obj, not null
loc - locale of the display name, not null
Returns:
attribute display name, null if none is available

getDisplayName

public java.lang.String getDisplayName(Attribute att,
                                       java.util.Locale loc,
                                       boolean fallback)
Get the display name for an Attribute, using a lookup method that starts with one specific locale, then progressively fallbacks to more general locales.
Parameters:
att - an attribute obj, not null
loc - locale of the display name, not null
fallback - true to use the fallback lookup method false to use single lookup using loc
Returns:
attribute display name, null if none is available
Since:
9.0.4

getDisplayName

public java.lang.String getDisplayName(Group grp,
                                       java.util.Locale loc)
Get the display name for a Group. Same as calling getDisplayName (grp, loc, true)
Parameters:
grp - a group obj, not null
loc - locale of the display name, not null
Returns:
group display name, null if none is available

getDisplayName

public java.lang.String getDisplayName(Group grp,
                                       java.util.Locale loc,
                                       boolean fallback)
Get the display name for a Group, using a lookup method that starts with one specific locale, then progressively fallbacks to more general locales.
Parameters:
grp - a group obj, not null
loc - locale of the display name, not null
fallback - true to use the fallback lookup method false to use single lookup using loc
Returns:
group display name, null if none is available
Since:
9.0.4

Skip navigation links

Oracle® Ultra Search Java API Reference
11g Release 1 (11.1)

B28329-02


Copyright © 2002,2008, Oracle. All Rights Reserved.