/*
 *  adaptationCriterion.java
 * 
 *  RELOAD Editor - An IMS Metadata, Content Packaging and Learning Design tool 
 *  with ADAPTATION AT ACTIVITY LEVEL
 *
 *  Copyright (c) 2006 Miguel Fern�ndez Lores
 *
 *  Technical Contact:
 *  Miguel Fernandez Lores
 *  e-mail: tucias@hotmail.com
 *
 */

package uk.ac.reload.editor.scormadaptive.rules.jdom.rule;

import org.jdom.Element;

/**
 * Adaptation Criterion container class
 * For PREEXISTING RULES
 *
 * @author  lagar
 * @version 0.2 
 */
public class adaptationCriterion {
    
    private String sSource;
    
    private String sValue;
    
    /** 
     * Creates a new instance of adaptationCriterion 
     */
    public adaptationCriterion(String value, String source) {
        
        sValue = value;
        sSource = source;
    }
    
    public String getValue(){
        return sValue;
    }
    
    public String getSource(){
        return sSource;
    }
    
    public Element getElement(){
        
        Element oElAC = new Element("adaptationParameter");
        Element oElSource =  new Element("source").setText(sSource);
        Element oElValue =  new Element("value").setText(sValue);
        oElAC.addContent(oElSource);
        oElAC.addContent(oElValue);
        
        return oElAC;
    }
}
