com.primus.searchcommon.constraint
Class FileExtensionConstraint

java.lang.Object
  extended by com.primus.searchcommon.constraint.BaseConstraint
      extended by com.primus.searchcommon.constraint.FileExtensionConstraint
All Implemented Interfaces:
DocumentSetConstraint, java.io.Serializable

public class FileExtensionConstraint
extends BaseConstraint

Constraints the results based on the file extension of the indexed file.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
FileExtensionConstraint(java.lang.String pFileExtension)
           
FileExtensionConstraint(java.lang.String pFileExtension, java.lang.Float pWeight)
           
 
Method Summary
 java.lang.String getFileExtension()
           
 java.lang.String toXml()
          Converts this constraint to the XML representation that can be sent in the ES Query.
 
Methods inherited from class com.primus.searchcommon.constraint.BaseConstraint
escapeToXml, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Constructor Detail

FileExtensionConstraint

public FileExtensionConstraint(java.lang.String pFileExtension)
Parameters:
pFileExtension - The file extension to restrict for.

FileExtensionConstraint

public FileExtensionConstraint(java.lang.String pFileExtension,
                               java.lang.Float pWeight)
Parameters:
pFileExtension -
pWeight -
Method Detail

getFileExtension

public java.lang.String getFileExtension()
Returns:
Returns the fileExtension.

toXml

public java.lang.String toXml()
Description copied from interface: DocumentSetConstraint
Converts this constraint to the XML representation that can be sent in the ES Query.

Returns: