Skip to content
Snippets Groups Projects
Commit bead0ba5 authored by Ronny Böttger's avatar Ronny Böttger
Browse files

renamed roles() to fulfillments()

parent a6b8ce9e
Branches
No related tags found
No related merge requests found
......@@ -9,11 +9,11 @@ aspect AttributeGetters {
public Attribute RigidType.getNewestAttribute(String name) {
Attribute match = null;
for (Fulfillment f : roles()) {
for (Fulfillment f : fulfillments()) {
Attribute a = f.getFilled().getAttributeByName(name);
if (a != null) match = a;
}
if (roles().isEmpty() || match == null) return getAttributeByName(name);
if (fulfillments().isEmpty() || match == null) return getAttributeByName(name);
return match;
}
......
aspect Plays {
coll ArrayList<Fulfillment> RigidType.roles()
coll ArrayList<Fulfillment> RigidType.fulfillments()
[new ArrayList<Fulfillment>()] with add;
//PersonConsultantFulfillment contributes this
Fulfillment contributes this
to RigidType.roles()
to RigidType.fulfillments()
for getFiller();
......@@ -25,7 +25,7 @@ aspect Plays {
//}
public void RigidType.unplays(RoleType rt) {
roles().removeIf(element -> (element.getFilled().equals(rt)));
fulfillments().removeIf(element -> (element.getFilled().equals(rt)));
}
/*------------------------------------------------------------------------------------------------------------------
......
......@@ -16,9 +16,9 @@ aspect Printing {
eq NaturalType.prettyPrint() {
StringBuilder sb = new StringBuilder();
sb.append("NT " + getName());
if (!roles().isEmpty())
if (!fulfillments().isEmpty())
sb.append("\n\tPlays ");
for (Fulfillment f : roles()) {
for (Fulfillment f : fulfillments()) {
sb.append("\n\t\t" + f.getFilled().getName() + " ");
}
if (getAttributeList().getNumChild() != 0)
......@@ -43,6 +43,11 @@ aspect Printing {
eq CompartmentType.prettyPrint() {
StringBuilder sb = new StringBuilder();
sb.append("CT " + getName());
if (!fulfillments().isEmpty())
sb.append("\n\tPlays ");
for (Fulfillment f : fulfillments()) {
sb.append("\n\t\t" + f.getFilled().getName() + " ");
}
if (getPartsList().getNumChild() != 0)
sb.append("\n\tContains ");
for (RoleType r : getPartsList()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment