org.modeldriven.fuml.repository.model.Classifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fuml Show documentation
Show all versions of fuml Show documentation
This open source software is a reference implementation, consisting of software and related files, for the OMG specification called the Semantics of a Foundational Subset for Executable UML Models (fUML). The reference implementation is intended to implement the execution semantics of UML activity models, accepting an XMI file from a conformant UML model as its input and providing an execution trace of the selected activity model(s) as its output. The core execution engine, which is directly generated from the normative syntactic and semantic models for fUML, may also be used as a library implementation of fUML in other software.
package org.modeldriven.fuml.repository.model;
import java.util.ArrayList;
import java.util.List;
import org.modeldriven.fuml.repository.Package;
import org.modeldriven.fuml.repository.RepositoryArtifact;
import fUML.Syntax.Classes.Kernel.DataType;
public class Classifier extends NamedElement
implements org.modeldriven.fuml.repository.Classifier {
private fUML.Syntax.Classes.Kernel.Classifier _classifier;
private org.modeldriven.fuml.repository.Package _package;
public Classifier(fUML.Syntax.Classes.Kernel.Classifier _classifier,
RepositoryArtifact artifact) {
super(_classifier, artifact);
this._classifier = _classifier;
}
public fUML.Syntax.Classes.Kernel.Classifier getDelegate() {
return this._classifier;
}
public Package getPackage() {
if (this._package == null) {
this._package =
new org.modeldriven.fuml.repository.model.Package(this._classifier.package_,
this.artifact);
}
return _package;
}
//public fUML.Syntax.Classes.Kernel.ClassifierList getGeneral() {
// return this._classifier.general;
//}
private List general = new ArrayList();
public List getGeneral() {
if (general.size() == 0 && this._classifier.general != null && this._classifier.general.size() > 0)
for (int i = 0; i < this._classifier.general.size(); i++)
this.general.add(new Classifier(this._classifier.general.get(i), this.artifact));
return general;
}
private List generalization = new ArrayList();
public List getGeneralization() {
if (generalization.size() == 0 && this._classifier.generalization != null && this._classifier.generalization.size() > 0)
for (int i = 0; i < this._classifier.generalization.size(); i++)
this.generalization.add(new Classifier(this._classifier.generalization.get(i).general,
this.artifact));
return generalization;
}
public boolean isAbstract() {
// fUML generated code has an isAbstract member on both Classifier and Class_
if (_classifier instanceof fUML.Syntax.Classes.Kernel.Class_)
return ((fUML.Syntax.Classes.Kernel.Class_)_classifier).isAbstract;
else
return this._classifier.isAbstract;
}
public boolean isDataType() {
return this._classifier instanceof DataType;
}
} // Classifier