public class VirtualDBNode
extends java.lang.Object
Constructor and Description |
---|
VirtualDBNode(MutableDataSource mds,
java.lang.String name,
DBNode parent) |
VirtualDBNode(MutableDataSource mds,
java.lang.String name,
java.lang.String displayName,
DBNode parent) |
Modifier and Type | Method and Description |
---|---|
double |
getFullTextSearchScore(java.lang.String... args)
Evaluates to a DOUBLE value equal to the full-text search score of a
node.
|
DBNode |
getParent() |
java.lang.String |
getPrimaryType(java.lang.String... args)
The primary type.
|
java.util.List |
getProperties(java.lang.String... args)
The list of properties.
|
java.util.List |
getReferencesUUID(java.lang.String... args)
The UUIDs of all nodes that point to this node.
|
int |
getSequence(java.lang.String... args)
The sequence of this node.
|
java.lang.String |
getUUID(java.lang.String... args)
If a node is referenceable, the Identifier of the Node must be the value
of its jcr:UUID property.
|
java.util.List |
getWeakReferencesUUID(java.lang.String... args)
The UUIDs of all nodes that point to this node.
|
boolean |
isChildNode(java.lang.String... args)
Tests whether the selectorName node is a child of a node reachable by
the absolute path specified.
|
boolean |
isContains(java.lang.String... args)
A query satisfies a FullTextSearch constraint if the value (or values)
of the full-text indexed properties within the full-text search scope
satisfy the specified fullTextSearchExpression, evaluated as follows:
A term not preceded with '-' (minus sign) is satisfied only if the value contains that term. |
boolean |
isDescendantNode(java.lang.String... args)
Tests whether the selectorName node is a descendant of a node reachable
by the absolute path specified.
|
boolean |
isDirectory() |
boolean |
isPublic(java.lang.String... args) |
boolean |
isReferenceable(java.lang.String... args)
In implementations that support referenceable nodes, these nodes have
more stringent requirements on their identifiers (see §3.8 Referenceable
Nodes).
|
boolean |
isSameNode(java.lang.String... args)
Tests whether the selectorName node is reachable by the absolute path
specified.
|
boolean |
isVersionable(java.lang.String... args)
Is this node versionable.
|
long |
lastModified() |
DBNode[] |
listNodes() |
DBNode |
setPrimaryType(java.lang.String value,
java.lang.String... args)
The primary type.
|
DBNode |
setProperties(java.util.List value,
java.lang.String... args)
The list of properties.
|
DBNode |
setReferenceable(boolean value,
java.lang.String... args)
In implementations that support referenceable nodes, these nodes have
more stringent requirements on their identifiers (see §3.8 Referenceable
Nodes).
|
DBNode |
setReferencesUUID(java.util.List value,
java.lang.String... args)
The UUIDs of all nodes that point to this node.
|
DBNode |
setSequence(int value,
java.lang.String... args)
The sequence of this node.
|
DBNode |
setUUID(java.lang.String value,
java.lang.String... args)
If a node is referenceable, the Identifier of the Node must be the value
of its jcr:UUID property.
|
DBNode |
setVersionable(boolean value,
java.lang.String... args)
Is this node versionable.
|
DBNode |
setWeakReferencesUUID(java.util.List value,
java.lang.String... args)
The UUIDs of all nodes that point to this node.
|
java.lang.String |
vDisplayName() |
java.lang.String |
vName() |
public VirtualDBNode(MutableDataSource mds, java.lang.String name, DBNode parent)
public VirtualDBNode(MutableDataSource mds, java.lang.String name, java.lang.String displayName, DBNode parent)
public DBNode getParent()
public DBNode[] listNodes() throws java.lang.Exception
java.lang.Exception
public long lastModified()
public boolean isDirectory()
public java.lang.String vName()
public java.lang.String vDisplayName()
public java.lang.String getUUID(java.lang.String... args)
args
- the optional arguments@Nonnull public DBNode setUUID(java.lang.String value, java.lang.String... args) throws java.lang.Exception
value
- UUIDargs
- the optional argumentsjava.lang.Exception
- a serious problem.public boolean isContains(java.lang.String... args)
args
- the optional argumentspublic double getFullTextSearchScore(java.lang.String... args)
args
- the optional argumentspublic boolean isChildNode(java.lang.String... args)
args
- the optional argumentspublic boolean isDescendantNode(java.lang.String... args)
http://www.day.com/specs/jcr/2.0/6_Query.html
args
- the optional argumentspublic boolean isSameNode(java.lang.String... args)
args
- the optional argumentspublic java.lang.String getPrimaryType(java.lang.String... args)
args
- the optional arguments@Nonnull public DBNode setPrimaryType(java.lang.String value, java.lang.String... args) throws java.lang.Exception
value
- Primary Typeargs
- the optional argumentsjava.lang.Exception
- a serious problem.public java.util.List getProperties(java.lang.String... args)
args
- the optional arguments@Nonnull public DBNode setProperties(java.util.List value, java.lang.String... args) throws java.lang.Exception
value
- Propertiesargs
- the optional argumentsjava.lang.Exception
- a serious problem.public boolean isReferenceable(java.lang.String... args)
3.8 Referenceable Nodes
A repository may support referenceable nodes. A node must be referenceable to serve as the target of a reference property, which is either a WEAKREFERENCE or REFERENCE. To be referenceable a node must be of type mix:referenceable.
3.8.1.1 mix:referenceable
[mix:referenceable]
mixin
- jcr:uuid (STRING) mandatory autocreated protected
INITIALIZE
This node type adds an auto-created, mandatory, protected STRING property to the node, called jcr:uuid, which exposes the identifier of the node. Note that the term “UUID” is used for backward compatibility with JCR 1.0 and does not necessarily imply the use of the UUID syntax, or global uniqueness.
The identifier of a referenceable node must be a referenceable identifier. Referenceable identifiers must fulfill a number of constraints beyond the minimum required of standard identifiers (see §3.8.3 Referenceable Identifiers).
A reference property is a property that holds the referenceable identifier of a referenceable node and therefore serves as a pointer to that node. The two types of reference properties, REFERENCE and WEAKREFERENCE differ in that the former enforces referential integrity while the latter does not (see §3.8.2 Referential Integrity). A repository may support only WEAKREFERENCE or both WEAKREFERENCE and REFERENCE property types.
3.8.2 Referential Integrity
Given a property P with value V in workspace W:
If P is of type REFERENCE then there must exist a node in W with identifier V.
If P is of type WEAKREFERENCE, no such restriction exists.
In a read-only context the only difference between the types is that a workspace cannot contain a dangling REFERENCE while it may contain a dangling WEAKREFERENCE.
3.8.2.1 Exceptions to Referential Integrity
In a repository that exposes version storage in content, such as one that supports full versioning, an exception is made to the referential integrity rule when the REFERENCE property in question is part of the frozen state of a version stored in version storage. In that case the frozen REFERENCE property may hold the identifier of a node that is no longer in the workspace (see §3.13.3.7 References in a Frozen Node).
3.8.3 Referenceable Identifiers
Every node has an identifier, where an identifier is a string which is the most stable available. A referenceable node, however, must have a referenceable identifier, which is subject to a number of further constraints:
3.8.3.1 Identifier Assignment
As with any identifier, a referenceable node's identifier must be assigned at the latest when the node is first persisted. However, the jcr:uuid property of the node must be created immediately upon the node becoming referenceable, which may be upon node creation or upon a later mixin addition. Consequently, the value of the jcr:uuid property before the first persist is not guaranteed to be the identifier of the node.
3.8.3.2 Identifier Immutable across Move and Clone
The identifier is immutable during the lifetime of the node, that is, until the node is deleted though a remove operation. In particular, the identifier is immutable across move and clone operations. Note that non-referenceable identifiers are not required to be immutable across these operations. As in the non-referenceable case, the referenceable identifier is not immutable across copy operations. This operation results in the creation of a new node with a new identifier.
3.8.3.3 Implementation Variations
These are the minimum requirements for a referenceable identifier, but implementations are free to exceed these requirements.
args
- the optional arguments@Nonnull public DBNode setReferenceable(boolean value, java.lang.String... args) throws java.lang.Exception
3.8 Referenceable Nodes
A repository may support referenceable nodes. A node must be referenceable to serve as the target of a reference property, which is either a WEAKREFERENCE or REFERENCE. To be referenceable a node must be of type mix:referenceable.
3.8.1.1 mix:referenceable
[mix:referenceable]
mixin
- jcr:uuid (STRING) mandatory autocreated protected
INITIALIZE
This node type adds an auto-created, mandatory, protected STRING property to the node, called jcr:uuid, which exposes the identifier of the node. Note that the term “UUID” is used for backward compatibility with JCR 1.0 and does not necessarily imply the use of the UUID syntax, or global uniqueness.
The identifier of a referenceable node must be a referenceable identifier. Referenceable identifiers must fulfill a number of constraints beyond the minimum required of standard identifiers (see §3.8.3 Referenceable Identifiers).
A reference property is a property that holds the referenceable identifier of a referenceable node and therefore serves as a pointer to that node. The two types of reference properties, REFERENCE and WEAKREFERENCE differ in that the former enforces referential integrity while the latter does not (see §3.8.2 Referential Integrity). A repository may support only WEAKREFERENCE or both WEAKREFERENCE and REFERENCE property types.
3.8.2 Referential Integrity
Given a property P with value V in workspace W:
If P is of type REFERENCE then there must exist a node in W with identifier V.
If P is of type WEAKREFERENCE, no such restriction exists.
In a read-only context the only difference between the types is that a workspace cannot contain a dangling REFERENCE while it may contain a dangling WEAKREFERENCE.
3.8.2.1 Exceptions to Referential Integrity
In a repository that exposes version storage in content, such as one that supports full versioning, an exception is made to the referential integrity rule when the REFERENCE property in question is part of the frozen state of a version stored in version storage. In that case the frozen REFERENCE property may hold the identifier of a node that is no longer in the workspace (see §3.13.3.7 References in a Frozen Node).
3.8.3 Referenceable Identifiers
Every node has an identifier, where an identifier is a string which is the most stable available. A referenceable node, however, must have a referenceable identifier, which is subject to a number of further constraints:
3.8.3.1 Identifier Assignment
As with any identifier, a referenceable node's identifier must be assigned at the latest when the node is first persisted. However, the jcr:uuid property of the node must be created immediately upon the node becoming referenceable, which may be upon node creation or upon a later mixin addition. Consequently, the value of the jcr:uuid property before the first persist is not guaranteed to be the identifier of the node.
3.8.3.2 Identifier Immutable across Move and Clone
The identifier is immutable during the lifetime of the node, that is, until the node is deleted though a remove operation. In particular, the identifier is immutable across move and clone operations. Note that non-referenceable identifiers are not required to be immutable across these operations. As in the non-referenceable case, the referenceable identifier is not immutable across copy operations. This operation results in the creation of a new node with a new identifier.
3.8.3.3 Implementation Variations
These are the minimum requirements for a referenceable identifier, but implementations are free to exceed these requirements.
value
- Referenceableargs
- the optional argumentsjava.lang.Exception
- a serious problem.public java.util.List getReferencesUUID(java.lang.String... args)
args
- the optional arguments@Nonnull public DBNode setReferencesUUID(java.util.List value, java.lang.String... args) throws java.lang.Exception
value
- References UUIDargs
- the optional argumentsjava.lang.Exception
- a serious problem.public int getSequence(java.lang.String... args)
args
- the optional arguments@Nonnull public DBNode setSequence(int value, java.lang.String... args) throws java.lang.Exception
value
- Sequenceargs
- the optional argumentsjava.lang.Exception
- a serious problem.public boolean isVersionable(java.lang.String... args)
args
- the optional arguments@Nonnull public DBNode setVersionable(boolean value, java.lang.String... args) throws java.lang.Exception
value
- Versionableargs
- the optional argumentsjava.lang.Exception
- a serious problem.public java.util.List getWeakReferencesUUID(java.lang.String... args)
args
- the optional arguments@Nonnull public DBNode setWeakReferencesUUID(java.util.List value, java.lang.String... args) throws java.lang.Exception
value
- Weak References UUIDargs
- the optional argumentsjava.lang.Exception
- a serious problem.public boolean isPublic(java.lang.String... args)
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.