Commit 710a3a93 authored by Guillaume Chomat's avatar Guillaume Chomat
Browse files

add the action transmorpher class

parent 0f1b0626
/**
* $Id: TmAction.java,v 1.1 2002-06-28 13:42:19 gchomat Exp $
*
* Transmorpher
*
* Copyright (C) 2001 Fluxmedia and INRIA Rhône-Alpes.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* define an action in the transmorpher
*
* @author Jerome.Euzenat@inrialpes.fr
* @since jdk 1.3 / SAX 2.0
*/
package fr.fluxmedia.transmorpher.action;
public interface TmAction{
public static int ADD = 0;
public static int REMOVE = 1;
public static int CHANGE = 2;
public Object getSource();
/* return the type of the action
*/
public int getType();
public Object getOldValue();
public Object getNewValue();
}
/**
* $Id: TmActionImpl.java,v 1.1 2002-06-28 13:42:19 gchomat Exp $
*
* Transmorpher
*
* Copyright (C) 2001 Fluxmedia and INRIA Rhne-Alpes.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* define an action in the transmorpher
*
* @author Jerome.Euzenat@inrialpes.fr
* @since jdk 1.3 / SAX 2.0
*/
package fr.fluxmedia.transmorpher.action;
public class TmActionImpl implements TmAction{
protected int type;
protected Object source;
protected Object oldValue;
protected Object newValue;
public TmActionImpl (int type,Object source, Object oldValue, Object newValue)
{
this.source=source;
this.type = type;
this.oldValue = oldValue;
this.newValue = newValue;
}
/**
* Get the value of type.
* @return value of type.
*/
public int getType(){
return type;
}
/**
* Get the value of source.
* @return value of source.
*/
public Object source getSource(){
return source;
}
/**
* Get the value of oldValue.
* @return value of oldValue.
*/
public Object getOldValue(){
return oldValue;
}
/**
* Get the value of newValue.
* @return value of newValue.
*/
public Object getNewValue(){
return newValue;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment