use of com.ramussoft.pb.MatrixProjection in project ramus by Vitaliy-Yakovchuk.
the class NFunction method getOwners.
public Row[] getOwners() {
Function function = (Function) getParentRow();
if (function.getDecompositionType() == MovingArea.DIAGRAM_TYPE_DFDS) {
if (function != null) {
List<Row> res = new ArrayList<Row>();
int c = function.getChildCount();
for (int i = 0; i < c; i++) {
Function function2 = (Function) function.getChildAt(i);
if (function2.getType() == Function.TYPE_DFDS_ROLE && this.equals(function2.getOwner())) {
Stream stream = (Stream) dataPlugin.findRowByGlobalId(function2.getLink());
if (stream != null) {
for (Row row : stream.getAdded()) if (!res.contains(row))
res.add(row);
}
}
}
Row[] rows = res.toArray(new Row[res.size()]);
RowFactory.sortByName(rows);
return rows;
}
}
String s = dataPlugin.getProperty(DataPlugin.PROPERTY_OUNERS);
if (s == null)
s = "";
final StringTokenizer st = new StringTokenizer(s);
final Vector<GlobalId> ids = new Vector<GlobalId>();
while (st.hasMoreTokens()) {
ids.add(GlobalId.convert(st.nextToken()));
}
final MatrixProjection projection = dataPlugin.getProjection(MatrixProjection.TYPE_IDEF0, "BOTTOM");
final Vector left = projection.getLeft(this);
final Vector<Row> res = new Vector<Row>();
Row[] rows;
for (int i = 0; i < left.size(); i++) {
final Stream r = (Stream) left.get(i);
if ((rows = r.getAdded()).length == 0)
addRow(res, ids, r);
else
for (final Row element2 : rows) addRow(res, ids, element2);
}
rows = res.toArray(new Row[res.size()]);
RowFactory.sortByName(rows);
return rows;
}
use of com.ramussoft.pb.MatrixProjection in project ramus by Vitaliy-Yakovchuk.
the class HTTPParser method printFunctionsArrows.
private void printFunctionsArrows(final Function function) throws IOException {
MatrixProjection projection = dataPlugin.getFastMatrixProjectionIDEF0(MovingPanel.TOP, function);
Vector left = getStreams(function, projection);
if (left.size() > 0)
printFunctionArrows(left, RES.getString("TopElements"));
projection = dataPlugin.getFastMatrixProjectionIDEF0(MovingPanel.LEFT, function);
left = getStreams(function, projection);
if (left.size() > 0)
printFunctionArrows(left, RES.getString("LeftElements"));
projection = dataPlugin.getFastMatrixProjectionIDEF0(MovingPanel.RIGHT, function);
left = getStreams(function, projection);
if (left.size() > 0)
printFunctionArrows(left, RES.getString("RightElements"));
projection = dataPlugin.getFastMatrixProjectionIDEF0(MovingPanel.BOTTOM, function);
left = getStreams(function, projection);
if (left.size() > 0)
printFunctionArrows(left, RES.getString("BottomElements"));
}
Aggregations