BasicStep.java :  » Testing » jacareto » jacareto » struct » Java Open Source

Java Open Source » Testing » jacareto 
jacareto » jacareto » struct » BasicStep.java
/*
 * Jacareto Copyright (c) 2002-2005
 * Applied Computer Science Research Group, Darmstadt University of
 * Technology, Institute of Mathematics & Computer Science,
 * Ludwigsburg University of Education, and Computer Based
 * Learning Research Group, Aachen University. All rights reserved.
 *
 * Jacareto 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.
 *
 * Jacareto 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 Jacareto; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

package jacareto.struct;


import jacareto.parse.RecordTokenizer;
import jacareto.system.Environment;

/**
 * The user structure "basic-step". It can include other structures. A structure element can parse
 * a part of a record.
 *
 * @author <a href="mailto:markus.bois@web.de">Markus Bois</a>
 * @version 1.0
 */
public class BasicStep extends InteractionModelStructureElement {
    /**
     * Creates a new "basic-step" structure element.
     *
     * @param env the environment
     * @param children the child structure elements
     */
    public BasicStep (Environment env, StructureElement[] children) {
        this(env, children, "", "");
    }

    /**
     * Creates a new "basic-step" structure element.
     *
     * @param env the environment
     * @param children the child structure elements
     * @param name the name of the basic-step
     * @param id the id in the interaction-model
     */
    public BasicStep (Environment env, StructureElement[] children, String name, String id) {
        super(env, children, name, id);
    }

    /**
     * Parses a record which is tokenized by the given record tokenizer.
     *
     * @param env DOCUMENT ME!
     * @param recordTokenizer the record tokenizer
     *
     * @return a structure element, or <code>null</code> if this class cannot parse the record at
     *         the current position
     */
    public static StructureElement parse (Environment env, RecordTokenizer recordTokenizer) {
        return null;
    }

    /**
     * Returns the name of the element.
     *
     * @return the name
     */
    public String getElementName () {
        return language.getString ("Structures.BasicStep.Name");
    }

    /**
     * Returns a description of the element.
     *
     * @return the description
     */
    public String getElementDescription () {
        return language.getString ("Structures.BasicStep.Description");
    }

    /**
     * Returns a String which describes the content of the element shortly.
     *
     * @return a string with a short description of the element
     */
    public String toShortString () {
        return getName () + " (" + getElementName () + ")";
    }

    /**
     * Clones the element.
     *
     * @return DOCUMENT ME!
     */
    public Object clone () {
        StructureElement[] clonedChildren = getClonedChildren ();

        return new BasicStep(env, clonedChildren, getName (), getID ());
    }

    /**
     * {@inheritDoc}
     */
    public boolean hasProcTime () {
        return true;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.