
ingenias.editor.entities.EMobileDevice Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sociaalmled Show documentation
Show all versions of sociaalmled Show documentation
A editor for modelling scenarios for PHAT simulator
The newest version!
/**
* Copyright (C) 2010 Jorge J. Gomez-Sanz
*
*
* This file is part of the INGENME tool. INGENME is an open source meta-editor
* which produces customized editors for user-defined modeling languages
*
* 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 version 3 of the License
*
* 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, see
**/
package ingenias.editor.entities;
import java.util.*;
import ingenias.editor.TypedVector;
public class EMobileDevice extends EMobilePhysicalEntity {
public java.lang.String WidthField;
public java.lang.String Description;
public java.lang.String DepthField;
public java.lang.String HeightField;
public EMobileDevice(String id) {
super(id);
this.setHelpDesc("");
this.setHelpRecom("");
}
public java.lang.String getWidthField(){
return WidthField;
}
public void setWidthField(java.lang.String
WidthField){
this.WidthField=WidthField;
}
public java.lang.String getDescription(){
return Description;
}
public void setDescription(java.lang.String
Description){
this.Description=Description;
}
public java.lang.String getDepthField(){
return DepthField;
}
public void setDepthField(java.lang.String
DepthField){
this.DepthField=DepthField;
}
public java.lang.String getHeightField(){
return HeightField;
}
public void setHeightField(java.lang.String
HeightField){
this.HeightField=HeightField;
}
public void fromMap(Map ht){
super.fromMap(ht);
if (ht.get("WidthField")!=null && ht.get("WidthField").equals(""))
this.setWidthField(null);
else
if (ht.get("WidthField")!=null)
this.setWidthField(new java.lang.String(ht.get("WidthField").toString()));
if (ht.get("Description")!=null && ht.get("Description").equals(""))
this.setDescription(null);
else
if (ht.get("Description")!=null)
this.setDescription(new java.lang.String(ht.get("Description").toString()));
if (ht.get("DepthField")!=null && ht.get("DepthField").equals(""))
this.setDepthField(null);
else
if (ht.get("DepthField")!=null)
this.setDepthField(new java.lang.String(ht.get("DepthField").toString()));
if (ht.get("HeightField")!=null && ht.get("HeightField").equals(""))
this.setHeightField(null);
else
if (ht.get("HeightField")!=null)
this.setHeightField(new java.lang.String(ht.get("HeightField").toString()));
}
public void toMap(Map ht){
super.toMap(ht);
//if (this.getWidthField() instanceof String)
if (this.getWidthField()!=null)
ht.put("WidthField",this.getWidthField().toString());
else
ht.put("WidthField","");
//if (this.getDescription() instanceof String)
if (this.getDescription()!=null)
ht.put("Description",this.getDescription().toString());
else
ht.put("Description","");
//if (this.getDepthField() instanceof String)
if (this.getDepthField()!=null)
ht.put("DepthField",this.getDepthField().toString());
else
ht.put("DepthField","");
//if (this.getHeightField() instanceof String)
if (this.getHeightField()!=null)
ht.put("HeightField",this.getHeightField().toString());
else
ht.put("HeightField","");
}
public String toString(){
/*if (this.getId()==null ||
this.getId().toString().equals(""))
return "Please, define the value of field Id";
else
return this.getId().toString();*/
return ""+getId();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy