org.apache.jackrabbit.core.journal
Class AbstractRecord

java.lang.Object
  extended by org.apache.jackrabbit.core.journal.AbstractRecord
All Implemented Interfaces:
Record
Direct Known Subclasses:
AppendRecord, ReadRecord

public abstract class AbstractRecord
extends Object
implements Record

Base implementation for a record.


Field Summary
protected  NamespaceResolver nsResolver
          Namespace resolver.
protected  NamePathResolver resolver
          Name and Path resolver.
 
Constructor Summary
AbstractRecord(NamespaceResolver nsResolver, NamePathResolver resolver)
          Create a new instance of this class.
 
Method Summary
 NodeId readNodeId()
          Read a NodeId from the underlying stream.
 QNodeTypeDefinition readNodeTypeDef()
          Read a NodeTypeDef from the underlying stream.
 Path readPath()
          Read a Path from the underlying stream.
 Path readPathElement()
          Read a named path element from the underlying stream.
 PropertyId readPropertyId()
          Read a PropertyId from the underlying stream.
 Name readQName()
          Read a Name frmo the underlying stream.
 void writeNodeId(NodeId nodeId)
          Write a NodeId to the underlying stream.
 void writeNodeTypeDef(QNodeTypeDefinition ntd)
          Write a NodeTypeDef to the underlying stream.
 void writePath(Path path)
          Write a Path to the underlying stream.
 void writePathElement(Path path)
          Write a Path.Element to the underlying stream.
 void writePropertyId(PropertyId propertyId)
          Write a PropertyId to the underlying stream.
 void writeQName(Name name)
          Write a Name to the underlying stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jackrabbit.core.journal.Record
cancelUpdate, getJournalId, getProducerId, getRevision, readBoolean, readByte, readChar, readFully, readInt, readLong, readString, update, write, writeBoolean, writeByte, writeChar, writeInt, writeLong, writeString
 

Field Detail

nsResolver

protected final NamespaceResolver nsResolver
Namespace resolver.


resolver

protected final NamePathResolver resolver
Name and Path resolver.

Constructor Detail

AbstractRecord

public AbstractRecord(NamespaceResolver nsResolver,
                      NamePathResolver resolver)
Create a new instance of this class.

Parameters:
nsResolver - the namespace resolver
resolver - the name-path resolver
Method Detail

writeQName

public void writeQName(Name name)
                throws JournalException
Write a Name to the underlying stream.

Specified by:
writeQName in interface Record
Parameters:
name - name
Throws:
JournalException - if an error occurs

writePathElement

public void writePathElement(Path path)
                      throws JournalException
Write a Path.Element to the underlying stream.

Specified by:
writePathElement in interface Record
Parameters:
path - path element
Throws:
JournalException - if an error occurs

writePath

public void writePath(Path path)
               throws JournalException
Write a Path to the underlying stream.

Specified by:
writePath in interface Record
Parameters:
path - path
Throws:
JournalException - if an error occurs

writeNodeId

public void writeNodeId(NodeId nodeId)
                 throws JournalException
Write a NodeId to the underlying stream.

Specified by:
writeNodeId in interface Record
Parameters:
nodeId - node id
Throws:
JournalException - if an error occurs

writePropertyId

public void writePropertyId(PropertyId propertyId)
                     throws JournalException
Write a PropertyId to the underlying stream.

Specified by:
writePropertyId in interface Record
Parameters:
propertyId - property id
Throws:
JournalException - if an error occurs

writeNodeTypeDef

public void writeNodeTypeDef(QNodeTypeDefinition ntd)
                      throws JournalException
Write a NodeTypeDef to the underlying stream.

Specified by:
writeNodeTypeDef in interface Record
Parameters:
ntd - node type definition
Throws:
JournalException - if an error occurs

readQName

public Name readQName()
               throws JournalException
Read a Name frmo the underlying stream.

Specified by:
readQName in interface Record
Returns:
name name
Throws:
JournalException - if an error occurs

readPathElement

public Path readPathElement()
                     throws JournalException
Read a named path element from the underlying stream.

Specified by:
readPathElement in interface Record
Returns:
path element
Throws:
JournalException - if an error occurs

readPath

public Path readPath()
              throws JournalException
Read a Path from the underlying stream.

Specified by:
readPath in interface Record
Returns:
path
Throws:
JournalException - if an error occurs

readNodeId

public NodeId readNodeId()
                  throws JournalException
Read a NodeId from the underlying stream.

Specified by:
readNodeId in interface Record
Returns:
node id
Throws:
JournalException - if an error occurs

readPropertyId

public PropertyId readPropertyId()
                          throws JournalException
Read a PropertyId from the underlying stream.

Specified by:
readPropertyId in interface Record
Returns:
property id
Throws:
JournalException - if an error occurs

readNodeTypeDef

public QNodeTypeDefinition readNodeTypeDef()
                                    throws JournalException
Read a NodeTypeDef from the underlying stream.

Specified by:
readNodeTypeDef in interface Record
Returns:
node type definition
Throws:
JournalException - if an error occurs


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.