This repository has been archived on 2024-04-22. You can view files and clone it, but cannot push or open issues or pull requests.
SecureUML-GUI/src/ch/ethz/infsec/secureumlgui/securemodel/dialects/metamodel/ResourceType.java

110 lines
2.6 KiB
Java

/**
*
*/
package ch.ethz.infsec.secureumlgui.securemodel.dialects.metamodel;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
/**
*
*/
public class ResourceType extends MetaModelClass
{
/* ResourceType is directly derived from the SecureUML
* Class "Resource" <==> parentResourceType == null */
private ResourceType parentResourceType;
public ResourceType getParentResourceType()
{
return parentResourceType;
}
public void setParentResourceType(ResourceType parentResourceType)
{
this.parentResourceType = parentResourceType;
}
private String modelElementStereotype;
public String getModelElementStereotype()
{
return modelElementStereotype;
}
public void setModelElementStereotype(String anchorStereotype)
{
this.modelElementStereotype = anchorStereotype;
}
private String anchorPath;
public String getAnchorPath()
{
return anchorPath;
}
public void setAnchorPath(String anchorPath)
{
this.anchorPath = anchorPath;
}
private String actionStereotype;
public String getActionStereotype()
{
return actionStereotype;
}
public void setActionStereotype(String actionStereotype)
{
this.actionStereotype = actionStereotype;
}
private String resourcePath;
public String getResoucePath()
{
return resourcePath;
}
public void setResoucePath(String resourcePath)
{
this.resourcePath = resourcePath;
}
public String toString()
{
String resourceString = this.getName();
if(this.getParentResourceType() != null)
{
resourceString = resourceString
+ " inherit "
+ this.getParentResourceType().getName();
}
resourceString = resourceString
+ "\n Tags: "
+ "\n umlClassName: " + getUmlClassName()
+ "\n modelelementStereotype: " + getModelElementStereotype()
+ "\n anchorPath: " + getAnchorPath()
+ "\n actionStereotype: " + getActionStereotype()
+ "\n resourcePath: " + getResoucePath();
resourceString = resourceString + "\n Attributes:";
for (Iterator iter = getAttributes().iterator(); iter.hasNext();)
{
MetaModelClassAttribute rta = (MetaModelClassAttribute) iter.next();
resourceString = resourceString + "\n - " + rta.toString();
}
return resourceString;
}
}