org.jcon.persistance
Interface TOFObjectFactory

All Known Implementing Classes:
LookupMappingMetaTOFObjectFactory, MetaTOFObjectFactory, UnserializingTOFObjectFactory

public interface TOFObjectFactory

An interface the TOFParser uses to build object graphs. Allows pluggable implementation.

Author:
Paul Reavis

Method Summary
 void addToArrayList(java.lang.Object vector, java.lang.Object item)
          Adds an item to a TOF ArrayList.
 void addToMap(java.lang.Object dictionary, java.lang.Object key, java.lang.Object value)
          Adds a mapping to a TOF dictionary.
 void addToSet(java.lang.Object set, java.lang.Object item)
          Adds an item to a TOF Set.
 java.lang.Object buildClassLiteral(java.lang.String name)
          Builds a class literal.
 java.lang.Object buildLookup(java.lang.Object classReference, java.lang.Object arg)
          Builds an object based on a lookup.
 java.lang.Object createArrayList()
          Creates a new object corresponding to a TOF vector.
 java.lang.Object createBean(java.lang.Object classLiteral)
          Creates a new object corresponding to a TOF bean.
 java.lang.Object createMap()
          Creates a new object corresponding to a TOF dictionary.
 java.lang.Object createSet()
          Creates an object corresponding to a TOF set.
 void importClass(java.lang.Object classy)
          Imports a class so that only the classname need be used to reference it in the remainder of the file.
 java.lang.Object importObject(java.lang.Object path)
          Imports an object from some StructuredStore.
 java.lang.Object importTextObject(java.lang.Object path)
          Imports a text object from some StructuredStore.
 void setBeanState(java.lang.Object bean, java.lang.Object state)
          Populates a bean with properties.
 java.lang.Object swizzle(int referenceNumber)
          Converts an integer reference into the object referenced.
 void unswizzle(int referenceNumber, java.lang.Object victim)
          Defines an integer reference for an object.
 

Method Detail

swizzle

java.lang.Object swizzle(int referenceNumber)
                         throws TOFException
Converts an integer reference into the object referenced.

Throws:
TOFException

unswizzle

void unswizzle(int referenceNumber,
               java.lang.Object victim)
               throws TOFException
Defines an integer reference for an object.

Throws:
TOFException

importClass

void importClass(java.lang.Object classy)
                 throws TOFException
Imports a class so that only the classname need be used to reference it in the remainder of the file.

Throws:
TOFException

buildLookup

java.lang.Object buildLookup(java.lang.Object classReference,
                             java.lang.Object arg)
                             throws TOFException
Builds an object based on a lookup.

Throws:
TOFException

buildClassLiteral

java.lang.Object buildClassLiteral(java.lang.String name)
                                   throws TOFException
Builds a class literal.

Throws:
TOFException

createSet

java.lang.Object createSet()
                           throws TOFException
Creates an object corresponding to a TOF set.

Throws:
TOFException

addToSet

void addToSet(java.lang.Object set,
              java.lang.Object item)
              throws TOFException
Adds an item to a TOF Set. The Set is the first argument.

Throws:
TOFException

createArrayList

java.lang.Object createArrayList()
                                 throws TOFException
Creates a new object corresponding to a TOF vector.

Throws:
TOFException

addToArrayList

void addToArrayList(java.lang.Object vector,
                    java.lang.Object item)
                    throws TOFException
Adds an item to a TOF ArrayList. The vector is the first argument.

Throws:
TOFException

createMap

java.lang.Object createMap()
                           throws TOFException
Creates a new object corresponding to a TOF dictionary.

Throws:
TOFException

addToMap

void addToMap(java.lang.Object dictionary,
              java.lang.Object key,
              java.lang.Object value)
              throws TOFException
Adds a mapping to a TOF dictionary.

Throws:
TOFException

createBean

java.lang.Object createBean(java.lang.Object classLiteral)
                            throws TOFException
Creates a new object corresponding to a TOF bean. The object is the class literal to use.

Throws:
TOFException

setBeanState

void setBeanState(java.lang.Object bean,
                  java.lang.Object state)
                  throws TOFException
Populates a bean with properties.

Throws:
TOFException

importObject

java.lang.Object importObject(java.lang.Object path)
                              throws TOFException
Imports an object from some StructuredStore.

Throws:
TOFException

importTextObject

java.lang.Object importTextObject(java.lang.Object path)
                                  throws TOFException
Imports a text object from some StructuredStore.

Throws:
TOFException