org.apache.jackrabbit.commons.predicate
Class NtFilePredicate

java.lang.Object
  extended by org.apache.jackrabbit.commons.predicate.NtFilePredicate
All Implemented Interfaces:
Predicate

public class NtFilePredicate
extends Object
implements Predicate

The nt file item filter matches all properties that are defined my the nt:file or nt:resource nodetype. the later only, if the respective nodes name is 'jcr:content'. Additionally the properties 'jcr:encoding' can be configured to be excluded.


Field Summary
protected  boolean ignoreEncoding
          indicates if the jcr:encoding property is to be excluded from this filter.
protected  boolean ignoreMimeType
          indicates if the jcr:mimeType property is to be excluded from this filter.
static String JCR_CONTENT
           
static String JCR_ENCODING
           
static String JCR_MIMETYPE
           
static String JCR_PRIMARY_TYPE
           
static String NT_FILE
           
static String NT_HIERARCHYNODE
           
static String NT_RESOURCE
           
 
Fields inherited from interface org.apache.jackrabbit.commons.predicate.Predicate
FALSE, TRUE
 
Constructor Summary
NtFilePredicate()
           
NtFilePredicate(boolean ignoreEncoding, boolean ignoreMimeType)
           
 
Method Summary
 boolean evaluate(Object item)
          Evaluates the predicate for the given object.
 boolean isIgnoreEncoding()
          Returns the ignore encoding flag.
 boolean isIgnoreMimeType()
          Returns the ignore mime type flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NT_FILE

public static final String NT_FILE
See Also:
Constant Field Values

NT_HIERARCHYNODE

public static final String NT_HIERARCHYNODE
See Also:
Constant Field Values

NT_RESOURCE

public static final String NT_RESOURCE
See Also:
Constant Field Values

JCR_CONTENT

public static final String JCR_CONTENT
See Also:
Constant Field Values

JCR_ENCODING

public static final String JCR_ENCODING
See Also:
Constant Field Values

JCR_MIMETYPE

public static final String JCR_MIMETYPE
See Also:
Constant Field Values

JCR_PRIMARY_TYPE

public static final String JCR_PRIMARY_TYPE
See Also:
Constant Field Values

ignoreEncoding

protected final boolean ignoreEncoding
indicates if the jcr:encoding property is to be excluded from this filter.


ignoreMimeType

protected final boolean ignoreMimeType
indicates if the jcr:mimeType property is to be excluded from this filter.

Constructor Detail

NtFilePredicate

public NtFilePredicate()

NtFilePredicate

public NtFilePredicate(boolean ignoreEncoding,
                       boolean ignoreMimeType)
Method Detail

isIgnoreEncoding

public boolean isIgnoreEncoding()
Returns the ignore encoding flag.

Returns:
the ignore encoding flag.

isIgnoreMimeType

public boolean isIgnoreMimeType()
Returns the ignore mime type flag.

Returns:
the ignore mime type flag.

evaluate

public boolean evaluate(Object item)
Description copied from interface: Predicate
Evaluates the predicate for the given object.

Specified by:
evaluate in interface Predicate
Parameters:
item - some object
Returns:
true if the item is a nt:file or nt:resource property
See Also:
Predicate.evaluate(java.lang.Object)


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.