public class DocumentPartImpl extends ComplexProperty implements DocumentPart
Modifier and Type | Field and Description |
---|---|
protected boolean |
clearComplexPropertyBeforeSet |
protected Schema |
schema |
children
deprecatedFallback, flags, forceDirty, IS_READONLY, isDeprecated, NON_CANON_INDEX, parent
DIRTY_MASK, IS_DIRTY, IS_MODIFIED, IS_MOVED, IS_NEW, IS_PHANTOM, IS_REMOVED, NONE
Constructor and Description |
---|
DocumentPartImpl(Schema schema) |
Modifier and Type | Method and Description |
---|---|
void |
accept(PropertyVisitor visitor,
Object arg)
Method that implement the visitor pattern.
|
Object |
clone() |
Path |
collectPath(Path path) |
Property |
createProperty(Property parent,
Field field) |
Property |
createProperty(Property parent,
Field field,
int flags) |
PropertyDiff |
exportDiff() |
boolean |
getClearComplexPropertyBeforeSet()
Whether or not to ignore any previous values when setting complex properties.
|
Field |
getField()
Gets the field corresponding to this property.
|
String |
getName()
Gets the property name.
|
Schema |
getSchema()
Gets the document schema defining the property tree from which the property belongs.
|
Schema |
getType()
Get the type of the field corresponding to this property.
|
void |
importDiff(PropertyDiff diff) |
void |
internalSetValue(Serializable value)
Sets the given normalized value.
|
boolean |
isContainer()
Whether this property is a container - this means the property value is a map or a list.
|
boolean |
isSameAs(DocumentPart dp) |
String |
toString() |
addEmpty, addValue, addValue, clear, clearDirtyFlags, containsKey, containsValue, entrySet, get, get, get, getChild, getChildren, getDefaultValue, getDirtyChildren, getNonPhantomChild, getNonPhantomChildren, getValueForWrite, init, internalGetChild, internalGetValue, isEmpty, isNormalized, isSameAs, keySet, normalize, put, putAll, remove, setValue, values, visitChildren
appendDirtyFlags, areFlagsSet, clearFlags, computeRemovedProperty, convertTo, getDeprecatedParent, getDirtyFlags, getObjectResolver, getParent, getPath, getRoot, getValue, getValue, getValue, getValue, getValueDeprecation, getXPath, getXPath, isComplex, isDeprecated, isDirty, isForceDirty, isList, isModified, isMoved, isNew, isPhantom, isReadOnly, isRemoved, isSameValue, isScalar, iterator, moveTo, newDeprecatedMessage, newInstance, remove, removePhantomFlag, resolvePath, resolvePath, setDirtyFlags, setFlags, setForceDirty, setIsModified, setIsMoved, setIsNew, setIsRemoved, setReadOnly, setValue, setValue, setValueDeprecation, size, validateType
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEmpty, addValue, addValue, clearDirtyFlags, convertTo, get, get, getChildren, getDirtyChildren, getDirtyFlags, getObjectResolver, getParent, getPath, getRoot, getValue, getValue, getValue, getValue, getValueForWrite, getXPath, init, isComplex, isDirty, isForceDirty, isList, isModified, isMoved, isNew, isNormalized, isPhantom, isReadOnly, isRemoved, isSameAs, isScalar, moveTo, newInstance, normalize, remove, resolvePath, resolvePath, setForceDirty, setReadOnly, setValue, setValue, setValue, size, validateType
forEach, iterator, spliterator
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll, size
protected boolean clearComplexPropertyBeforeSet
public DocumentPartImpl(Schema schema)
public void internalSetValue(Serializable value) throws PropertyException
AbstractProperty
This applies only for nodes that physically store a value (that means non container nodes). Container nodes does nothing.
internalSetValue
in class AbstractProperty
PropertyException
public boolean isContainer()
Property
Container properties don't have a scalar values. Container values are computed each time they are requested - by
calling on of the getValue
methods - by collecting the values of the child properties.
isContainer
in interface Property
public Schema getSchema()
Property
getSchema
in interface DocumentPart
getSchema
in interface Property
getSchema
in class AbstractProperty
public Schema getType()
Property
getType
in interface Property
getType
in class ComplexProperty
public Field getField()
Property
The field is the object defining the property. You can see the field as a java class and the property as a class instance
public Path collectPath(Path path)
collectPath
in class AbstractProperty
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public void accept(PropertyVisitor visitor, Object arg) throws PropertyException
Property
The visitor must return null to stop visiting children otherwise a context object that will be passed as the arg argument to children
accept
in interface Property
visitor
- the visitor to acceptarg
- an argument passed to the visitor. This should be used by the visitor to carry on the visiting
context.PropertyException
public Property createProperty(Property parent, Field field)
createProperty
in interface DocumentPart
public Property createProperty(Property parent, Field field, int flags)
createProperty
in interface DocumentPart
public boolean getClearComplexPropertyBeforeSet()
DocumentPart
getClearComplexPropertyBeforeSet
in interface DocumentPart
true
if setting a complex property ignores any previous valuespublic PropertyDiff exportDiff()
exportDiff
in interface DocumentPart
public void importDiff(PropertyDiff diff)
importDiff
in interface DocumentPart
public boolean isSameAs(DocumentPart dp)
public String toString()
toString
in class AbstractProperty
Copyright © 2018 Nuxeo. All rights reserved.