Package org.apache.jackrabbit.vault.util
Class DocViewProperty
- java.lang.Object
 - 
- org.apache.jackrabbit.vault.util.DocViewProperty
 
 
- 
@Deprecated public class DocViewProperty extends java.lang.ObjectDeprecated.UseDocViewProperty2instead.Helper class that represents a JCR property in the FileVault (enhanced) document view format. It contains formatting and parsing methods for writing/reading enhanced docview properties.
The string representation adheres to the following grammar:prop:= [ "{" type "}" ] ( value | "[" [ value { "," value } ] "]" ) type :=PropertyType.nameFromValue(int)|BINARY_REFvalue := is a string representation of the value where the following characters are escaped: ',\[{' with a leading '\' 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBINARY_REFDeprecated.booleanisMultiDeprecated.indicates a multi-value propertybooleanisReferencePropertyDeprecated.indicates a binary ref propertyjava.lang.StringnameDeprecated.name of the propertyinttypeDeprecated.type of this property (can be undefined)java.lang.String[]valuesDeprecated.value(s) of the property. 
- 
Constructor Summary
Constructors Constructor Description DocViewProperty(java.lang.String name, java.lang.String[] values, boolean multi, int type)Deprecated.Creates a new property.DocViewProperty(java.lang.String name, java.lang.String[] values, boolean multi, int type, boolean isRef)Deprecated.Creates a new property. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanapply(javax.jcr.Node node)Deprecated.Sets this property on the given nodebooleanequals(java.lang.Object obj)Deprecated.static java.lang.Stringformat(javax.jcr.Property prop)Deprecated.Formats (serializes) the given JCR property value according to the enhanced docview syntax.static java.lang.Stringformat(javax.jcr.Property prop, boolean sort, boolean useBinaryReferences)Deprecated.Formats (serializes) the given JCR property value to the enhanced docview syntax.java.lang.StringformatValue()Deprecated.Generates string representation of this DocView property value.static DocViewPropertyfromDocViewProperty2(DocViewProperty2 property)Deprecated.static DocViewPropertyfromProperty(@NotNull javax.jcr.Property prop, boolean sort, boolean useBinaryReferences)Deprecated.Creates a new property based on a JCRPropertyobjectstatic DocViewPropertyfromValues(@NotNull java.lang.String name, @NotNull javax.jcr.Value[] values, int type, boolean isMulti, boolean sort, boolean useBinaryReferences)Deprecated.Creates a new property based on an array ofValuesinthashCode()Deprecated.static booleanisAmbiguous(javax.jcr.Property prop)Deprecated.was not supposed to be public but rather is an implementation detail, should not be called at allstatic DocViewPropertyparse(java.lang.String name, java.lang.String value)Deprecated.Parses a enhanced docview property string and returns the property.java.lang.StringtoString()Deprecated.This does not return the string representation of the enhanced docview property value but rather a descriptive string including the property name for debugging purposes. 
 - 
 
- 
- 
Field Detail
- 
BINARY_REF
public static final java.lang.String BINARY_REF
Deprecated.- See Also:
 - Constant Field Values
 
 
- 
name
public final java.lang.String name
Deprecated.name of the property 
- 
values
public final java.lang.String[] values
Deprecated.value(s) of the property. always contains at least one value if this is not a mv property. 
- 
isMulti
public final boolean isMulti
Deprecated.indicates a multi-value property 
- 
type
public final int type
Deprecated.type of this property (can be undefined) 
- 
isReferenceProperty
public final boolean isReferenceProperty
Deprecated.indicates a binary ref property 
 - 
 
- 
Constructor Detail
- 
DocViewProperty
public DocViewProperty(java.lang.String name, java.lang.String[] values, boolean multi, int type)Deprecated.Creates a new property.- Parameters:
 name- name of the propertyvalues- values.multi- multiple flagtype- type of the property- Throws:
 java.lang.IllegalArgumentException- if single value property and not exactly 1 value is given.
 
- 
DocViewProperty
public DocViewProperty(java.lang.String name, java.lang.String[] values, boolean multi, int type, boolean isRef)Deprecated.Creates a new property.- Parameters:
 name- name of the propertyvalues- string representation of values.multi- indicates if this is a multi-value propertytype- type of the propertyisRef-trueto indicate that this is a binary reference property- Throws:
 java.lang.IllegalArgumentException- if single value property and not exactly 1 value is given.
 
 - 
 
- 
Method Detail
- 
fromValues
public static DocViewProperty fromValues(@NotNull @NotNull java.lang.String name, @NotNull @NotNull javax.jcr.Value[] values, int type, boolean isMulti, boolean sort, boolean useBinaryReferences) throws javax.jcr.RepositoryException
Deprecated.Creates a new property based on an array ofValues- Parameters:
 name- the name of the propertyvalues- the values (always an array, may be empty), must not containnullitemstype- the type of the propertyisMulti-truein case this is a multivalue propertysort-truein case the value array should be sorted firstuseBinaryReferences- to use the binary reference as value (if available)- Returns:
 - the new property
 - Throws:
 javax.jcr.RepositoryException
 
- 
fromProperty
public static DocViewProperty fromProperty(@NotNull @NotNull javax.jcr.Property prop, boolean sort, boolean useBinaryReferences) throws javax.jcr.RepositoryException
Deprecated.Creates a new property based on a JCRPropertyobject- Parameters:
 prop- the JCR propertysort- iftruemulti-value properties should be sorteduseBinaryReferences-trueto use binary references- Returns:
 - the new property
 - Throws:
 java.lang.IllegalArgumentException- if single value property and not exactly 1 value is given.javax.jcr.RepositoryException- if another error occurs
 
- 
fromDocViewProperty2
public static DocViewProperty fromDocViewProperty2(DocViewProperty2 property)
Deprecated. 
- 
parse
public static DocViewProperty parse(java.lang.String name, java.lang.String value)
Deprecated.Parses a enhanced docview property string and returns the property.- Parameters:
 name- name of the propertyvalue- (attribute) value- Returns:
 - a property
 
 
- 
format
public static java.lang.String format(javax.jcr.Property prop) throws javax.jcr.RepositoryExceptionDeprecated.Formats (serializes) the given JCR property value according to the enhanced docview syntax.- Parameters:
 prop- the JCR property- Returns:
 - the formatted string of the property value
 - Throws:
 javax.jcr.RepositoryException- if a repository error occurs
 
- 
format
public static java.lang.String format(javax.jcr.Property prop, boolean sort, boolean useBinaryReferences) throws javax.jcr.RepositoryExceptionDeprecated.Formats (serializes) the given JCR property value to the enhanced docview syntax.- Parameters:
 prop- the JCR propertysort- iftruemulti-value properties are sorteduseBinaryReferences-trueto use binary references- Returns:
 - the formatted string of the property value
 - Throws:
 javax.jcr.RepositoryException- if a repository error occurs
 
- 
formatValue
public java.lang.String formatValue()
Deprecated.Generates string representation of this DocView property value.- Returns:
 - the string representation of the value
 
 
- 
isAmbiguous
@Deprecated public static boolean isAmbiguous(javax.jcr.Property prop) throws javax.jcr.RepositoryExceptionDeprecated.was not supposed to be public but rather is an implementation detail, should not be called at allChecks if the type of the given property is ambiguous in respect to it's property definition. the current implementation just checks some well known properties.- Parameters:
 prop- the property- Returns:
 - type
 - Throws:
 javax.jcr.RepositoryException- if a repository error occurs
 
- 
apply
public boolean apply(javax.jcr.Node node) throws javax.jcr.RepositoryExceptionDeprecated.Sets this property on the given node- Parameters:
 node- the node- Returns:
 trueif the value was modified.- Throws:
 javax.jcr.RepositoryException- if a repository error occurs
 
- 
hashCode
public int hashCode()
Deprecated.- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object obj)
Deprecated.- Overrides:
 equalsin classjava.lang.Object
 
- 
toString
public java.lang.String toString()
Deprecated.This does not return the string representation of the enhanced docview property value but rather a descriptive string including the property name for debugging purposes. UseformatValue(),format(Property)orformat(Property, boolean, boolean)to get the enhanced docview string representation of the value.- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -