use of com.ramussoft.pb.Stream in project ramus by Vitaliy-Yakovchuk.
the class HTTPParser method printFunctionArrows.
private void printFunctionArrows(final Vector left, final String string) throws IOException {
final Vector<Row> v = new Vector<Row>();
for (int i = 0; i < left.size(); i++) {
final Stream stream = (Stream) left.get(i);
final Row[] rs = stream.getAdded();
for (final Row row : rs) {
if (v.indexOf(row) < 0)
v.add(row);
}
}
final Row[] rows = new Row[v.size()];
for (int i = 0; i < rows.length; i++) rows[i] = v.get(i);
if (rows.length == 0)
return;
RowFactory.sortByName(rows);
htmlStream.println("<p>");
htmlStream.println("<table border=1 width=100%>");
printMainTableTitle(string, 3);
htmlStream.print("<tr>");
htmlStream.print("<td><b>");
htmlStream.print(RES.getString("kod"));
htmlStream.print("</b></td>");
htmlStream.print("<td><b>");
htmlStream.print(RES.getString("element"));
htmlStream.print("</b></td>");
htmlStream.print("<td><b>");
htmlStream.print(RES.getString("clasificator"));
htmlStream.print("</b></td>");
htmlStream.println("</tr>");
for (final Row row : rows) {
htmlStream.print("<tr>");
htmlStream.print("<td>");
printStartATeg("rows/index.html?id=" + row.getGlobalId().toString());
htmlStream.print(row.getKod());
printEndATeg();
htmlStream.print("</td>");
htmlStream.print("<td width=100%>");
printStartATeg("rows/index.html?id=" + row.getGlobalId().toString());
htmlStream.print(row.getName());
printEndATeg();
htmlStream.print("</td>");
Qualifier q = dataPlugin.getEngine().getQualifier(row.getElement().getQualifierId());
Element element = StandardAttributesPlugin.getElement(dataPlugin.getEngine(), q.getId());
htmlStream.print("<td>");
String name = q.getName();
if (element != null) {
printStartATeg("rows/index.html?id=" + element.getId());
} else {
if (name.equals(StandardAttributesPlugin.QUALIFIERS_QUALIFIER))
name = RES.getString("clasificator");
}
htmlStream.print(name);
if (element != null) {
printEndATeg();
}
htmlStream.print("</td>");
htmlStream.println("</tr>");
}
htmlStream.println("</table>");
htmlStream.println("</p>");
}
use of com.ramussoft.pb.Stream in project ramus by Vitaliy-Yakovchuk.
the class AbstractSector method getStreamChilds.
private void getStreamChilds(final Vector<Sector> v) {
final Stream stream = getStream();
final Vector<Sector> n = new Vector<Sector>(3);
getChilds(getStart().getCrosspoint(), n);
getChilds(getEnd().getCrosspoint(), n);
for (final Sector s : n) {
if ((s.getStream() == null || stream != null && stream.equals(s.getStream())) && (v.indexOf(s) < 0)) {
v.add(s);
((AbstractSector) s).getStreamChilds(v);
}
}
}
use of com.ramussoft.pb.Stream in project ramus by Vitaliy-Yakovchuk.
the class IDLImporter method getStream.
private Stream getStream(String name) {
Stream stream = streams.get(name);
if (stream == null) {
stream = (Stream) plugin.createRow(plugin.getBaseStream(), true);
stream.setName(name);
streams.put(name, stream);
}
return stream;
}
use of com.ramussoft.pb.Stream in project ramus by Vitaliy-Yakovchuk.
the class NFunction method getOwner.
public Row getOwner() {
// Row row = dataPlugin.findRowByGlobalId(getLink());
// if (row != null)
// return row;
Row owner = getNativeOwner();
if (getType() >= Function.TYPE_EXTERNAL_REFERENCE)
return owner;
if (owner == null) {
Function par = (Function) getParent();
if (par == null)
return null;
Row ow = null;
if (par.getDecompositionType() == MovingArea.DIAGRAM_TYPE_DFDS) {
for (com.ramussoft.database.common.Row r : ((NFunction) par).getChildren()) {
Function function = (Function) r;
if (function.getType() == TYPE_DFDS_ROLE && this.equals(function.getOwner())) {
Stream stream = (Stream) dataPlugin.findRowByGlobalId(function.getLink());
if (stream != null) {
Row[] rows = stream.getAdded();
if (rows.length > 1) {
ow = null;
break;
} else if (rows.length == 1) {
if (ow != null) {
ow = null;
break;
} else
ow = rows[0];
}
}
}
}
}
if (ow != null)
return ow;
}
if (owner == null && getParentRow() != null)
return ((Function) getParentRow()).getOwner();
return owner;
}
use of com.ramussoft.pb.Stream in project ramus by Vitaliy-Yakovchuk.
the class AbstractSector method splitSectorStreams.
private void splitSectorStreams(final Sector sector) {
final Stream my = getStream();
final Stream other = splitStream(my);
if (my == null)
return;
((AbstractSector) sector).setThisStream(other);
}
Aggregations