wt.index
Class RwareIndexDelegate

java.lang.Object
  extended bywt.index.RwareIndexDelegate
All Implemented Interfaces:
Externalizable, IndexServiceDelegate, Serializable

public class RwareIndexDelegate
extends Object
implements IndexServiceDelegate, Externalizable

This is the class that extracts textual information from Windchill business objects and sends it off to be indexed into a RetrievalWare library. Note that you should not call or instantiate the RwareIndexDelegate directly, but rely on the queing mechanism of the IndexService to execute the methods when appropriate.

Supported API: true

Extendable: true

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  LinkedList contentItems
           
static long EXTERNALIZATION_VERSION_UID
           
private  Hashtable fieldTbl
           
private  IndexAccessorConnection iaccConn
           
private  IndexAccessor indexAccessor
           
private static long indexContent
           
private static LinkedList libraries
           
private static Locale locale
           
private  String objIdentity
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static Vector supportedRwareDocs
          Contains the list of supported document types that are configured with Rware
 
Constructor Summary
RwareIndexDelegate()
           
 
Method Summary
protected  void addFieldToTbl(String fieldName, String fieldValue)
          This method can be used by instances of IndexServiceDelegate that subclass RwareIndexDelegate to index the appropriate fields into the library

Supported API: false
 void custom_getAdditionalFieldData(Indexable indexable)
          Deprecated.  
 void custom_getAdditionalMetaData(Indexable indexable)
          Deprecated.  
 void custom_getFieldData()
          Deprecated.  
 void custom_getMetaData(Indexable indexable)
          This method indexes all attributes of an object into the Rware metadata field and is searchable using that field.
 boolean delete(LinkedList indexCollection, IndexerSet libraries)
          This method is used to delete an item from the index based on the items UFID key

Supported API: false
 IndexAccessor getIndexAccessor()
          Gets the value of the attribute: indexAccessor.
private  Object getPropValueObj(ClassInfo objInfo, String propStr, Indexable indexable)
           
 WTCollection index(WTCollection indexCollection)
          This method is used to generate all of the information required for an object to be indexed.
protected  void indexInstanceAttributes(Indexable indexable)
          Called by the custom_getMetaData method and looks for all soft attributes (IBAs) and indexes them to an ibas field in the index and are searchable through the keyword or using the ibas field search, or the generic keyword query.
private  void initializeConnection(int operation)
           
protected  IndexAccessor initIndexAccessor(IndexAccessorConnection iaccConn, int operation)
           
 Locale localeFromString(String localeString)
           
private  void Log(String line)
           
private  void processContentItems(Indexable indexable)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(RwareIndexDelegate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private  String sanitize(String str)
           
private  void sendAttributeToIndex(ClassInfo objInfo, PropertyDescriptor prop, Indexable indexable)
           
protected  void sendAttributeToIndex(String indexField, String value, IndexAccessor iacc, Indexable indexable)
          This method is to be used by an implementing IndexServiceDelegate as a method to call to index metadata to the indexer.
 void setIndexAccessor(IndexAccessor a_IndexAccessor)
          Sets the value of the attribute: indexAccessor.
private  void updateIndexerSet(WTCollection indexables)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
protected  void writeFieldData()
           
private  void writeLibraries(Indexable indexable)
           
private  void writeLibraries(IndexerSet list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

indexAccessor

private IndexAccessor indexAccessor

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

fieldTbl

private Hashtable fieldTbl

iaccConn

private IndexAccessorConnection iaccConn

objIdentity

private String objIdentity

supportedRwareDocs

private static Vector supportedRwareDocs
Contains the list of supported document types that are configured with Rware


indexContent

private static long indexContent

contentItems

private LinkedList contentItems

libraries

private static LinkedList libraries

locale

private static Locale locale
Constructor Detail

RwareIndexDelegate

public RwareIndexDelegate()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(RwareIndexDelegate thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getIndexAccessor

public IndexAccessor getIndexAccessor()
Gets the value of the attribute: indexAccessor.

Supported API: false

Returns:
IndexAccessor

setIndexAccessor

public void setIndexAccessor(IndexAccessor a_IndexAccessor)
                      throws WTPropertyVetoException
Sets the value of the attribute: indexAccessor.

Supported API: false

Parameters:
a_IndexAccessor -
Throws:
WTPropertyVetoException

index

public WTCollection index(WTCollection indexCollection)
                   throws IndexingException,
                          WTException,
                          IllegalAccessException,
                          InvocationTargetException,
                          ClassNotFoundException,
                          InstantiationException,
                          PropertyVetoException,
                          IOException
This method is used to generate all of the information required for an object to be indexed. It makes calls to base methods, customized methods as well as method to get the content for an FormatContentHolder object.

Supported API: false

Specified by:
index in interface IndexServiceDelegate
Parameters:
indexCollection -
Returns:
WTCollection
Throws:
IndexingException
WTException
IllegalAccessException
InvocationTargetException
ClassNotFoundException
InstantiationException
PropertyVetoException
IOException

delete

public boolean delete(LinkedList indexCollection,
                      IndexerSet libraries)
               throws IndexingException,
                      WTException,
                      IllegalAccessException,
                      InvocationTargetException,
                      ClassNotFoundException,
                      InstantiationException,
                      PropertyVetoException,
                      IOException
This method is used to delete an item from the index based on the items UFID key

Supported API: false

Specified by:
delete in interface IndexServiceDelegate
Parameters:
indexCollection -
libraries -
Returns:
boolean
Throws:
IndexingException
WTException
IllegalAccessException
InvocationTargetException
ClassNotFoundException
InstantiationException
PropertyVetoException
IOException

indexInstanceAttributes

protected void indexInstanceAttributes(Indexable indexable)
Called by the custom_getMetaData method and looks for all soft attributes (IBAs) and indexes them to an ibas field in the index and are searchable through the keyword or using the ibas field search, or the generic keyword query.

Supported API: false

Parameters:
indexable -

custom_getMetaData

public void custom_getMetaData(Indexable indexable)
                        throws WTException,
                               IndexingException
This method indexes all attributes of an object into the Rware metadata field and is searchable using that field. Attributes defined in wt.index.IndexFields are indexed as seperate fields. All soft attributes (IBAs) are indexed to an ibas field in rware and are searchable through the keyword or using the ibas field search. This method should not be overriden in any subclasses of RwareIndexDelegate. Customizers can disable the metadata and iba indexing capabilities by modifying the wt.pproperties listed here. wt.index.IndexMetaData=false wt.index.IndexIBAs=false

Supported API: false

Specified by:
custom_getMetaData in interface IndexServiceDelegate
Parameters:
indexable -
Throws:
WTException
IndexingException

custom_getAdditionalMetaData

public void custom_getAdditionalMetaData(Indexable indexable)
                                  throws WTException,
                                         IndexingException
Deprecated.  

This method is intended by customizers to override in a custom sub-class of the IndexServiceDelegate provided

Supported API: true

Specified by:
custom_getAdditionalMetaData in interface IndexServiceDelegate
Parameters:
indexable -
Throws:
WTException
IndexingException

custom_getAdditionalFieldData

public void custom_getAdditionalFieldData(Indexable indexable)
                                   throws WTException,
                                          IndexingException
Deprecated.  

This method is intended by customizers to override in a custom sub-class of the IndexServiceDelegate provided

Supported API: true

Specified by:
custom_getAdditionalFieldData in interface IndexServiceDelegate
Parameters:
indexable -
Throws:
WTException
IndexingException

custom_getFieldData

public void custom_getFieldData()
                         throws WTException,
                                IndexingException
Deprecated.  

This is no longer used in the base installation, but was included as part of backwards support

Supported API: false

Specified by:
custom_getFieldData in interface IndexServiceDelegate
Throws:
WTException
IndexingException

addFieldToTbl

protected void addFieldToTbl(String fieldName,
                             String fieldValue)
This method can be used by instances of IndexServiceDelegate that subclass RwareIndexDelegate to index the appropriate fields into the library

Supported API: false

Parameters:
fieldName -
fieldValue -

sendAttributeToIndex

protected void sendAttributeToIndex(String indexField,
                                    String value,
                                    IndexAccessor iacc,
                                    Indexable indexable)
                             throws WTException,
                                    IllegalAccessException,
                                    InvocationTargetException
This method is to be used by an implementing IndexServiceDelegate as a method to call to index metadata to the indexer.

Supported API: false

Parameters:
indexField -
value -
iacc -
indexable -
Throws:
WTException
IllegalAccessException
InvocationTargetException

initIndexAccessor

protected IndexAccessor initIndexAccessor(IndexAccessorConnection iaccConn,
                                          int operation)
                                   throws IndexingException,
                                          WTException,
                                          IllegalAccessException,
                                          InvocationTargetException,
                                          ClassNotFoundException,
                                          InstantiationException,
                                          PropertyVetoException,
                                          IOException
Throws:
IndexingException
WTException
IllegalAccessException
InvocationTargetException
ClassNotFoundException
InstantiationException
PropertyVetoException
IOException

initializeConnection

private void initializeConnection(int operation)
                           throws IllegalAccessException,
                                  IOException,
                                  ClassNotFoundException,
                                  PropertyVetoException,
                                  WTException,
                                  InstantiationException,
                                  InvocationTargetException
Throws:
IllegalAccessException
IOException
ClassNotFoundException
PropertyVetoException
WTException
InstantiationException
InvocationTargetException

sendAttributeToIndex

private void sendAttributeToIndex(ClassInfo objInfo,
                                  PropertyDescriptor prop,
                                  Indexable indexable)
                           throws WTException,
                                  IllegalAccessException,
                                  InvocationTargetException
Throws:
WTException
IllegalAccessException
InvocationTargetException

getPropValueObj

private Object getPropValueObj(ClassInfo objInfo,
                               String propStr,
                               Indexable indexable)
                        throws WTException
Throws:
WTException

writeFieldData

protected void writeFieldData()
                       throws WTException,
                              IllegalAccessException,
                              InvocationTargetException,
                              PropertyVetoException
Throws:
WTException
IllegalAccessException
InvocationTargetException
PropertyVetoException

localeFromString

public Locale localeFromString(String localeString)

Log

private void Log(String line)

sanitize

private String sanitize(String str)

updateIndexerSet

private void updateIndexerSet(WTCollection indexables)
                       throws WTException
Throws:
WTException

processContentItems

private void processContentItems(Indexable indexable)
                          throws WTException,
                                 PropertyVetoException,
                                 IllegalAccessException,
                                 InvocationTargetException
Throws:
WTException
PropertyVetoException
IllegalAccessException
InvocationTargetException

writeLibraries

private void writeLibraries(Indexable indexable)

writeLibraries

private void writeLibraries(IndexerSet list)