All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jentity.datamodel.generator.IOMClass Maven / Gradle / Ivy

package org.jentity.datamodel.generator;

import java.util.*;

public class IOMClass {

  private String name = "";
  private String doc = "";
  private String stereotype = "";

  private ArrayList attributes = new ArrayList();
  private ArrayList operations = new ArrayList();

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getStereotype() {
    return stereotype;
  }

  public void setStereotype(String stereotype) {
    this.stereotype = stereotype;
  }

  public ArrayList getAttributes() {
    return attributes;
  }

  public void addAttribute(IOMAttribute attribute) {
    attributes.add(attribute);
    attribute.setClassParent(this);
  }

  public ArrayList getOperations() {
    return operations;
  }

  public void addOperation(IOMOperation operation) {
    operations.add(operation);
    operation.setClassParent(this);
  }

  public ArrayList getMyAssociations() {
    ArrayList ret = new ArrayList();
    for (int i = 0; i < IOMController.getAssociations().size() ; i++) {
      IOMAssociation ass = (IOMAssociation) IOMController.getAssociations().get(i);
      if(ass.getStartRole().getClassInvolved().getName().equals(this.name)
        ||ass.getEndRole().getClassInvolved().getName().equals(this.name))
        ret.add(ass);
    }
    return ret;
  }
  
  public String getDoc() {
      return doc;
  }
  public void setDoc(String doc) {
      this.doc = doc;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy