Class NtFilePredicate
- java.lang.Object
-
- org.apache.jackrabbit.commons.predicate.NtFilePredicate
-
- All Implemented Interfaces:
Predicate
public class NtFilePredicate extends java.lang.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
Fields Modifier and Type Field Description static java.lang.StringJCR_CONTENTstatic java.lang.StringJCR_ENCODINGstatic java.lang.StringJCR_MIMETYPEstatic java.lang.StringJCR_PRIMARY_TYPEstatic java.lang.StringNT_FILEstatic java.lang.StringNT_HIERARCHYNODEstatic java.lang.StringNT_RESOURCE
-
Constructor Summary
Constructors Constructor Description NtFilePredicate()NtFilePredicate(boolean ignoreEncoding, boolean ignoreMimeType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluate(java.lang.Object item)Evaluates the predicate for the given object.booleanisIgnoreEncoding()Returns theignore encodingflag.booleanisIgnoreMimeType()Returns theignore mime typeflag.
-
-
-
Field Detail
-
NT_FILE
public static final java.lang.String NT_FILE
- See Also:
- Constant Field Values
-
NT_HIERARCHYNODE
public static final java.lang.String NT_HIERARCHYNODE
- See Also:
- Constant Field Values
-
NT_RESOURCE
public static final java.lang.String NT_RESOURCE
- See Also:
- Constant Field Values
-
JCR_CONTENT
public static final java.lang.String JCR_CONTENT
- See Also:
- Constant Field Values
-
JCR_ENCODING
public static final java.lang.String JCR_ENCODING
- See Also:
- Constant Field Values
-
JCR_MIMETYPE
public static final java.lang.String JCR_MIMETYPE
- See Also:
- Constant Field Values
-
JCR_PRIMARY_TYPE
public static final java.lang.String JCR_PRIMARY_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isIgnoreEncoding
public boolean isIgnoreEncoding()
Returns theignore encodingflag.- Returns:
- the
ignore encodingflag.
-
isIgnoreMimeType
public boolean isIgnoreMimeType()
Returns theignore mime typeflag.- Returns:
- the
ignore mime typeflag.
-
evaluate
public boolean evaluate(java.lang.Object item)
Description copied from interface:PredicateEvaluates the predicate for the given object.- Specified by:
evaluatein interfacePredicate- Parameters:
item- some object- Returns:
trueif the item is a nt:file or nt:resource property- See Also:
Predicate.evaluate(java.lang.Object)
-
-