Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
This file is part of Sarasvati.
Sarasvati is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
Sarasvati is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with Sarasvati. If not, see .
Copyright 2008-2009 Paul Lorenz
*/
package com.googlecode.sarasvati.mem;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import com.googlecode.sarasvati.Arc;
import com.googlecode.sarasvati.ArcToken;
import com.googlecode.sarasvati.CustomNode;
import com.googlecode.sarasvati.ExecutionType;
import com.googlecode.sarasvati.External;
import com.googlecode.sarasvati.Graph;
import com.googlecode.sarasvati.GraphProcess;
import com.googlecode.sarasvati.JoinType;
import com.googlecode.sarasvati.Node;
import com.googlecode.sarasvati.NodeToken;
import com.googlecode.sarasvati.TokenSet;
import com.googlecode.sarasvati.env.Env;
import com.googlecode.sarasvati.impl.MapEnv;
import com.googlecode.sarasvati.load.AbstractGraphFactory;
import com.googlecode.sarasvati.load.NodeFactory;
import com.googlecode.sarasvati.load.definition.CustomDefinition;
import com.googlecode.sarasvati.load.properties.DOMToObjectLoadHelper;
public class MemGraphFactory extends AbstractGraphFactory
{
public static final MemGraphFactory INSTANCE = new MemGraphFactory();
public MemGraphFactory ()
{
super( MemNode.class );
}
@Override
public MemGraph newGraph (final String name,
final int version,
final String customId)
{
return new MemGraph( name, customId );
}
@Override
public Arc newArc (final Graph graph,
final Node startNode,
final Node endNode,
final String name)
{
MemArc arc = new MemArc( name, startNode, endNode );
graph.getArcs().add( arc );
return arc;
}
@Override
public Node newNode (final Graph graph,
final String name,
final String type,
final JoinType joinType,
final String joinParam,
final boolean isStart,
final String guard,
final List