FOM Reference > Formatting > References > fIndexReference interface
  
fIndexReference interface
Macro: trefind
PI: "reference",4 and "reference",7
Define an index reference. The reference point is set when fFormatting.addReference() is called.
To emulate the behaviour of "reference",7 it will be necessary to manually output the string form of the reference. e.g. formatting.write( idxref.toString());
PageNumberFormat enumeration
These constants define the number format to use when writing page numbers to the generated index.
The values 0 to 9 correspond to the fIndex.numberFormats array in use when formatting.
The PageNumberFormat enumeration has the following constants of type int.
FORMAT_CUSTOM = 10
Used to create a free-format reference. Set the customFormat string to the desired output.
FORMAT_SEE = 11
Used to create a see/see also reference. Set the customFormat string to the desired output, 'see'/'see also' will be added as appropriate.
FORMAT_CUSTOM_EXACT = 12
Used to create a free-format reference. Set the customFormat string to the desired output.
Unlike FORMAT_CUSTOM no additional processing of the customFormat string will occur.
FORMAT_SEE_EXACT = 13
Used to create a see reference. Set the customFormat string to the desired output, 'see' will be added as appropriate.
Unlike FORMAT_SEE no additional processing of the customFormat string will occur.
FORMAT_SEEALSO_EXACT = 14
Used to create a see also reference. Set the customFormat string to the desired output, 'see also' will be added as appropriate.
Unlike FORMAT_SEE no additional processing of the customFormat string will occur.
GroupMask enumeration
These constants define the available groups to use for the index reference.
The GroupMask enumeration has the following constants of type int.
GROUP_1 = 1
The reference will appear in indexes using group 1.
GROUP_2 = 2
The reference will appear in indexes using group 2.
GROUP_3 = 4
The reference will appear in indexes using group 3.
GROUP_4 = 8
The reference will appear in indexes using group 4.
GROUP_5 = 16
The reference will appear in indexes using group 5.
bookmark attribute
When generating the index referece, should a bookmark also be created. If an fBookmarkReference is provided it will be used as a template to create the bookmark and tbklnk PIs will be added to the generated index.
bookmark
Access
read-write
Returns
fBookmarkReference
customFormat attribute
When the numberFormat is FORMAT_CUSTOM, or FORMAT_SEE, set this value to the desired output.
customFormat
Access
read-write
Returns
String
displayStrings attribute
The text to use for the sort key in the generated index. A maximum of 5 levels can be used. If not provided, the value stored in the equivalent sortKeys property will be used.
If the index reference needs to be sorted differently from its display text, add the desired displayText at the appropriate level.
E.g. indexRef.sortKeys[0] = 'fIndexReference'; indexRef.sortKeys[1] = 'sortKeys'; indexRef.displayStrings[1] = 'sortKeys[]';
displayStrings
Access
read-write
Returns
fStringArray
groups attribute
The group(s) in which the index reference appears, default is group 1. See fIndexReference.GroupMask.
The groups value is used in conjunction with the groups value in the appropriate fIndex control object to determine which index references appear in the generated index.
groups
Access
read-write
Returns
int
numberFormat attribute
The desired page number format for this reference. See fIndexReference.PageNumberFormat.
numberFormat
Access
read-write
Returns
int
permutates attribute
If multiple permutations are desired for the reference, set the appropriate level to true to indicate its use in creating the different permutations.
E.g. indexRef.sortKeys[0] = 'fIndexReference'; indexRef.sortKeys[1] = 'permutates'; indexRef.permutates[0] = true; indexRef.permutates[1] = true; -- creates to index entries fIndexReference, permutates & permutates, fIndexReference
permutates
Access
read-write
Returns
fIntArray
sortKeys attribute
The index reference term values to be used in the generated index. A maximum of 5 levels can be used.
sortKeys
Access
read-write
Returns
fStringArray
fIndexReference method
Constructor for an fIndexReference, used to create a new fIndexReference object.
fIndexReferencegroupsindexEntrynumberFormatcustomFormat
Parameters
intgroups
[optional] Group(s) in which index appears. See fIndexReference.GroupMask
StringindexEntry
[optional] A string containing the index entry, with each index level separated by a | (vertical bar) character. Any entry that needs to be sorted differently should have the sort key separated from the reference by a ^ character, e.g. three^APP.
intnumberFormat
[optional] The desired page number format for this reference. See fIndexReference.PageNumberFormat.
StringcustomFormat
[optional] The desired format page number text, used when numberFormat is fIndexReference.FORMAT_CUSTOM or fIndexReference.FORMAT_SEE.
Returns
fIndexReference. A new object of class fIndexReference.
readResolve method
Return the object corresponding to the given serialized representation.
readResolveobj
Parameters
Objectobj
The serialized representation.
Returns
fIndexReference. The object corresponding to the serialized representation.
toString method
Return the PI compatible string for the index reference.
toString
Parameters
None
Returns
String. A PI compatible representation of this index reference as a string.