de.uni_leipzig.wifa.iwi.mr3.dao.neo4j.impl
Class AbstractNeoSaveProcessor

Package class diagram package AbstractNeoSaveProcessor
java.lang.Object
  extended by de.uni_leipzig.wifa.iwi.mr3.dao.neo4j.impl.AbstractNeoSaveProcessor
All Implemented Interfaces:
SaveProcessor
Direct Known Subclasses:
PhaseOneSaveProcessor, PhaseTwoSaveProcessor

public abstract class AbstractNeoSaveProcessor
extends Object
implements SaveProcessor

Abstract save phase processor for neo4j storage.

This class contains all the methods all neo4j specific implementations need.


Constructor Summary
AbstractNeoSaveProcessor()
           
 
Method Summary
protected  org.neo4j.api.core.Node createNode()
          Create a node.
protected  org.neo4j.api.core.Node createNodeWithRelationship(org.neo4j.api.core.Node node, EcoreRelationshipType relType, boolean ordered)
          Creates a node and binds it by a specified relationship to the given node.
 void dispatch(org.eclipse.emf.ecore.EObject element, Map<org.eclipse.emf.ecore.EObject,Object> registry)
          Dispatch the current element to its handler.
 NeoHelper getHelper()
          Getter.
protected  org.neo4j.api.core.Node getNodeFromRegistry(org.eclipse.emf.ecore.EObject element, Map<org.eclipse.emf.ecore.EObject,Object> registry)
          Determine a node from the registry.
 void process(org.eclipse.emf.ecore.resource.Resource resource, Map<org.eclipse.emf.ecore.EObject,Object> registry)
          Process.
 void setHelper(NeoHelper neoHelper)
          Setter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.uni_leipzig.wifa.iwi.mr3.dao.SaveProcessor
process, process, process, process, process, process, process, process, process, process, process, process, process, process
 

Constructor Detail

AbstractNeoSaveProcessor

public AbstractNeoSaveProcessor()
Method Detail

setHelper

public void setHelper(NeoHelper neoHelper)
Setter.

Parameters:
neoHelper - the helper to set

getHelper

public NeoHelper getHelper()
Getter.

Returns:
the helper

process

public void process(org.eclipse.emf.ecore.resource.Resource resource,
                    Map<org.eclipse.emf.ecore.EObject,Object> registry)
Process.

Specified by:
process in interface SaveProcessor
Parameters:
resource - Resource
registry - Node cache
See Also:
SaveProcessor.process(org.eclipse.emf.ecore.resource.Resource, java.util.Map)

dispatch

public void dispatch(org.eclipse.emf.ecore.EObject element,
                     Map<org.eclipse.emf.ecore.EObject,Object> registry)
Dispatch the current element to its handler.

The order of dispatch types dependends on type hierarchy. Special types must be checked earlier then generally types.

Specified by:
dispatch in interface SaveProcessor
Parameters:
element - Element to dispatch
registry - Node cache

getNodeFromRegistry

protected org.neo4j.api.core.Node getNodeFromRegistry(org.eclipse.emf.ecore.EObject element,
                                                      Map<org.eclipse.emf.ecore.EObject,Object> registry)
Determine a node from the registry.

Parameters:
element - Element for what we need a node.
registry - Node cache
Returns:
Node

createNodeWithRelationship

protected org.neo4j.api.core.Node createNodeWithRelationship(org.neo4j.api.core.Node node,
                                                             EcoreRelationshipType relType,
                                                             boolean ordered)
Creates a node and binds it by a specified relationship to the given node.

Parameters:
node - the node
relType - the relationship type
ordered - true if node will be created with ordering position value
Returns:
the created and bound node

createNode

protected org.neo4j.api.core.Node createNode()
Create a node. Optionally the node gets a position ordering value.

Returns:
Node


Copyright © 2010 Uni-Leipzig. All Rights Reserved.