|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.repository.sequencer.SequencerOutputMap
@NotThreadSafe public class SequencerOutputMap
A basic SequencerOutput
that records all information in-memory and which organizes the properties by node
paths
and provides access to the nodes in a natural path-order.
Nested Class Summary | |
---|---|
class |
SequencerOutputMap.Entry
An entry in a SequencerOutputMap, which contains the path of the node and the property values
on the node. |
protected class |
SequencerOutputMap.EntryIterator
|
class |
SequencerOutputMap.PropertyValue
A property name and value pair. |
Constructor Summary | |
---|---|
SequencerOutputMap(ValueFactories factories)
|
Method Summary | |
---|---|
protected List<SequencerOutputMap.PropertyValue> |
getProperties(Path nodePath)
Get the properties for the node given by the supplied path. |
boolean |
isEmpty()
Return whether there are no entries |
Iterator<SequencerOutputMap.Entry> |
iterator()
Return the entries in this output in an order with shorter paths first. |
protected List<SequencerOutputMap.PropertyValue> |
removeProperties(Path nodePath)
|
void |
setProperty(Path nodePath,
Name propertyName,
Object... values)
Set the supplied property on the supplied node. |
void |
setProperty(String nodePath,
String property,
Object... values)
Deprecated. As of ModeShape 2.0, the preferred approach is to use setProperty(Path, Name, Object...) , which
properly addresses the session having different namespace mappings. This method depends on the namespace
mappings for the given URIs in the name components of the nodePath and propertyName to be mapped in the
NamespaceRegistry of the ModeShapeEngine's (or JcrEngine's) ExecutionContext. |
void |
setReference(String nodePath,
String propertyName,
String... paths)
Deprecated. As of ModeShape 2.0, the preferred approach is to use setProperty(Path, Name, Object...) , which
properly addresses the session having different namespace mappings. This method depends on the namespace
mappings for the given URIs in the name components of the nodePath and propertyName to be mapped in the
NamespaceRegistry of the ModeShapeEngine's (or JcrEngine's) ExecutionContext. |
int |
size()
Return the number of node entries in this map. |
protected void |
sortValues()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SequencerOutputMap(ValueFactories factories)
Method Detail |
---|
public void setProperty(Path nodePath, Name propertyName, Object... values)
The value factories
should be used to create paths, names, and values.
These factories can be used to create new values or convert values from one property type to another. (Note that each of
the factories have methods that create values from all of the property types.)
setProperty
in interface SequencerOutput
nodePath
- the path to the node containing the property; may not be nullpropertyName
- the name of the property to be setvalues
- the value(s) for the property; may be empty if any existing property is to be removed@Deprecated public void setProperty(String nodePath, String property, Object... values)
setProperty(Path, Name, Object...)
, which
properly addresses the session having different namespace mappings. This method depends on the namespace
mappings for the given URIs in the name components of the nodePath and propertyName to be mapped in the
NamespaceRegistry of the ModeShapeEngine's (or JcrEngine's) ExecutionContext.
The value factories
should be used to create paths, names, and values.
These factories can be used to create new values or convert values from one property type to another. (Note that each of
the factories have methods that create values from all of the property types.)
This method is provided as a convenience, but it identical to creating a Path
and Name
using the
factories
and calling SequencerOutput.setProperty(Path, Name, Object...)
.
setProperty
in interface SequencerOutput
nodePath
- the path to the node containing the property; may not be nullproperty
- the name of the property to be setvalues
- the value(s) for the property; may be empty if any existing property is to be removed@Deprecated public void setReference(String nodePath, String propertyName, String... paths)
setProperty(Path, Name, Object...)
, which
properly addresses the session having different namespace mappings. This method depends on the namespace
mappings for the given URIs in the name components of the nodePath and propertyName to be mapped in the
NamespaceRegistry of the ModeShapeEngine's (or JcrEngine's) ExecutionContext.
This method is provided as a convenience, but it identical to creating a Path
and Name
using the
factories
and calling SequencerOutput.setProperty(Path, Name, Object...)
.
setReference
in interface SequencerOutput
nodePath
- the path to the node containing the property; may not be nullpropertyName
- the name of the property to be setpaths
- the paths to the referenced property, which may be absolute paths or relative to the sequencer output node;
may be empty if any existing property is to be removedpublic int size()
public boolean isEmpty()
protected List<SequencerOutputMap.PropertyValue> removeProperties(Path nodePath)
protected List<SequencerOutputMap.PropertyValue> getProperties(Path nodePath)
nodePath
- the path to the node
public Iterator<SequencerOutputMap.Entry> iterator()
iterator
in interface Iterable<SequencerOutputMap.Entry>
protected void sortValues()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |