Java tutorial
/* * Copyright 2012 Devoteam http://www.devoteam.com * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * * This file is part of Multi-Protocol Test Suite (MTS). * * Multi-Protocol Test Suite (MTS) 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 3 of the * License. * * Multi-Protocol Test Suite (MTS) 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 Multi-Protocol Test Suite (MTS). * If not, see <http://www.gnu.org/licenses/>. * */ package com.devoteam.srit.xmlloader.asn1.dictionary; import org.dom4j.Element; import com.devoteam.srit.xmlloader.core.coding.binary.Dictionary; import com.devoteam.srit.xmlloader.core.coding.binary.ElementAbstract; /** * Represent an embedded object; use in the dictionary classes * * @author fhenry */ public class Embedded { // the object to replace from private String initial; // the object to replace to private String replace; // the condition for performing the replacement private String condition; public Embedded() { } public Embedded(String initial, String replace, String condition) { super(); this.initial = initial; this.replace = replace; this.condition = condition; } public String getInitial() { return initial; } public void setInitial(String initial) { this.initial = initial; } public String getReplace() { return replace; } public void setReplace(String replace) { this.replace = replace; } public String getCondition() { return condition; } public void setCondition(String condition) { this.condition = condition; } public void parseFromXML(Element elementRoot, Dictionary dictionary) throws Exception { this.initial = elementRoot.attributeValue("initial"); this.replace = elementRoot.attributeValue("replace"); this.condition = elementRoot.attributeValue("condition"); } }