com.sapportals.portal.pcd.gl

Class IPcdAttribute.SEARCH

java.lang.Object
  extended by com.sapportals.portal.pcd.gl.IPcdAttribute.SEARCH
Enclosing interface:
IPcdAttribute

public static class IPcdAttribute.SEARCH
extends Object

This subclass holds search relevant constants.

With the introduction of the constants COMPARE_STRENGTH_PRIMARY, COMPARE_STRENGTH_SECONDARY and COMPARE_STRENGTH_TERTIARY the Pcd GL is able to perform language-sensitive String searching and String comparison that is used in the various expressions offered during search. Often the 'normal' equals,compare or indexOf methods available for Strings are not sufficent when there are requirements for a language-sensitive search. The following lists those issues which are applicable to text searching:

  • The accented letters
    In English, accents are treated as minor variations of a letter.
    In French, accented letters have much more significance as they can actually change the meaning of a word. Very often, an accented letter is actually a distinct letter. For example, letter 'Å' may be just a letter 'A' followed by an accent symbol to English speakers. However, it is actually a distinct letter in Danish.
    In some cases, such as in traditional German, an accented letter is short-hand for something longer. In sorting, an 'ä' is treated as 'ae'.

  • The conjoined letters
    Special handling is required when a single letter is treated equivalent to two distinct letters and vice versa.
    For example, in German, the letter 'ß' is treated as 'ss' in sorting.
    Also, in most languages, 'æ' is considered equivalent to the letter 'a' followed by the letter 'e'. Also, the ligatures are often treated as distinct letters by themselves.
    For example, 'ch' is treated as a distinct letter between the letter 'c' and the letter 'd' in Spanish.
  • The search functionality uses the compare methods of Collatorand the CollationElementIteratorwhenever it comes to a search in String- or Text-valued attributes.

    Example for a use in filterExpressions:

    (&(com.sap.portal.pcd.gl.ObjectClass=myObjectClass)(title:com.sap.portal.pcd.gl.compareStrengthSecondary:=*my*title*))

    This filter string searches for all objects of the specified objectclass containing the patterns my and title in the title attribute ignoring case differences. Thus also returning objects with title e.g. mySpecialTitle .

    Please keep in mind that when using COMPARE_STRENGTH_PRIMARY and COMPARE_STRENGTH_SECONDARY constants in addition with attributes IPcdAttribute.ATOMIC_NAMEand IPcdAttribute.OBJECT_CLASSthe Pcd GL is unable to perform a fast database search.


    Field Summary
    static String COMPARE_STRENGTH_PRIMARY
              A CompareStrength value indicates the level at which two collation elements should be considered equal.
    static String COMPARE_STRENGTH_SECONDARY
              A CompareStrength value indicates the level at which two collation elements should be considered equal.
    static String COMPARE_STRENGTH_TERTIARY
              A CompareStrength value indicates the level at which two collation elements should be considered equal.
     
    Constructor Summary
    IPcdAttribute.SEARCH()
               
     
    Method Summary
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    COMPARE_STRENGTH_PRIMARY

    public static final String COMPARE_STRENGTH_PRIMARY
    A CompareStrength value indicates the level at which two collation elements should be considered equal.
    At the Primary level, only primary differences are considered significant. Primary differences are locale-dependent, but are typically differences in basic character identity.
    COMPARE_STRENGTH_PRIMARY ignores case and accents.
    An example of a primary difference is a != b.
    An example of a primary identity is a = A and a = ä and s = ß.


    COMPARE_STRENGTH_SECONDARY

    public static final String COMPARE_STRENGTH_SECONDARY
    A CompareStrength value indicates the level at which two collation elements should be considered equal.
    At the Secondary level, both primary and secondary differences are considered significant. Secondary differences are locale-dependent, but are typically differences in diacritics.
    COMPARE_STRENGTH_SECONDARY ignores case but considers accents.
    An example of a secondary difference is a != ä.
    An example of a secondary identity is a = A.


    COMPARE_STRENGTH_TERTIARY

    public static final String COMPARE_STRENGTH_TERTIARY
    A CompareStrength value indicates the level at which two collation elements should be considered equal.
    At the Tertiary level, primary, secondary, and tertiary differences are considered significant. Tertiary differences are locale-dependent, but are typically differences in appearance, such as the differences between uppercase, lowercase, superscript, subscript, halfwidth, and circled versions of a character.
    COMPARE_STRENGTH_TERTIARY considers case, accents and other differences. It's the highest level of equality and the default if no level is specified.
    An example of a tertiary difference is a != A.
    An example of a tertiary identity is a = a.

    Constructor Detail

    IPcdAttribute.SEARCH

    public IPcdAttribute.SEARCH()
    Access Rights

    This class can be accessed from:

    
    
    SC DC Public Part ACH
    [sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api - EP-PIN
    [sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api api EP-PIN
    [sap.com] EP-BASIS [sap.com] tc/epbc/pcd/pars/srvgldeprecated api BC-PIN-PCD
    [sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


    Copyright 2011 SAP AG Complete Copyright Notice