public class DocViewProperty
extends java.lang.Object
prop:= [ "{" type "}" ] ( value | "[" [ value { "," value } ] "]" )
Modifier and Type | Field and Description |
---|---|
boolean |
isMulti
indicates a MV property
|
boolean |
isReferenceProperty
indicates a binary ref property
|
java.lang.String |
name
name of the property
|
int |
type
type of this property (can be undefined)
|
java.lang.String[] |
values
value(s) of the property.
|
Constructor and Description |
---|
DocViewProperty(java.lang.String name,
java.lang.String[] values,
boolean multi,
int type)
Creates a new property.
|
DocViewProperty(java.lang.String name,
java.lang.String[] values,
boolean multi,
int type,
boolean isRef)
Creates a new property.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(Node node)
Sets this property on the given node
|
static java.lang.String |
format(Property prop)
Formats the given jcr property to the enhanced docview syntax.
|
static java.lang.String |
format(Property prop,
boolean sort,
boolean useBinaryReferences)
Formats the given jcr property to the enhanced docview syntax.
|
static boolean |
isAmbiguous(Property prop)
Checks if the type of the given property is ambiguous in respect to it's
property definition.
|
static DocViewProperty |
parse(java.lang.String name,
java.lang.String value)
Parses a enhanced docview property string and returns the property.
|
public final java.lang.String name
public final java.lang.String[] values
public final boolean isMulti
public final int type
public final boolean isReferenceProperty
public DocViewProperty(java.lang.String name, java.lang.String[] values, boolean multi, int type)
name
- name of the propertyvalues
- values.multi
- multiple flagtype
- type of the propertyjava.lang.IllegalArgumentException
- if single value property and not exactly 1 value is given.public DocViewProperty(java.lang.String name, java.lang.String[] values, boolean multi, int type, boolean isRef)
name
- name of the propertyvalues
- values.multi
- multiple flagtype
- type of the propertyisRef
- true
to indicated that this is a binary reference propertyjava.lang.IllegalArgumentException
- if single value property and not exactly 1 value is given.public static DocViewProperty parse(java.lang.String name, java.lang.String value)
name
- name of the propertyvalue
- (attribute) valuepublic static java.lang.String format(Property prop) throws RepositoryException
prop
- the jcr propertyRepositoryException
- if a repository error occurspublic static java.lang.String format(Property prop, boolean sort, boolean useBinaryReferences) throws RepositoryException
prop
- the jcr propertysort
- if true
multivalue properties are sorteduseBinaryReferences
- true
to use binary referencesRepositoryException
- if a repository error occurspublic static boolean isAmbiguous(Property prop) throws RepositoryException
prop
- the propertyRepositoryException
- if a repository error occurspublic boolean apply(Node node) throws RepositoryException
node
- the nodetrue
if the value was modified.RepositoryException
- if a repository error occursCopyright © 2010 - 2020 Adobe. All Rights Reserved