use of com.ramussoft.pb.Function in project ramus by Vitaliy-Yakovchuk.
the class ModelParaleler method getRow.
private Row getRow(Row r) {
if (r == fromDataPlugin.getBaseStream())
return toDataPlugin.getBaseStream();
if ((r == null) || (r.getElement() == null))
return null;
if ((function != null) && (r.equals(function.getParentRow())))
return base;
Row res = rowHash.get(r.getElement().getId());
if (res == null) {
res = toDataPlugin.createRow(getRow(getParentRow(r)), r.isElement());
rowHash.put(r.getElement().getId(), res);
if (r instanceof Function)
if (!(res instanceof Function))
System.out.println(res);
copyRow(r, res);
}
return res;
}
use of com.ramussoft.pb.Function in project ramus by Vitaliy-Yakovchuk.
the class DFDSNamePanel method compile.
private void compile(DFDSName name) {
Row row = dataPlugin.findRowByGlobalId(element.getId());
if (row instanceof Function) {
Function function = (NFunction) row;
dataPlugin.compileDFDSName(name, function);
}
}
use of com.ramussoft.pb.Function in project ramus by Vitaliy-Yakovchuk.
the class AbstractCrosspoint method remove1.
public void remove1(final Sector sector) {
// synchronized (dataPlugin) {
final boolean b = isDLevel();
removeData(sector);
final Sector[] ins = getIns();
final Sector[] outs = getOuts();
if (b) {
if (ins.length == 0 && outs.length == 1) {
if (outs[0].getEnd().getCrosspoint() == null)
if (outs[0].getStart().getBorderType() >= 0)
outs[0].remove();
else {
/*Function function = outs[0].getStart().getFunction();
if (function != null
&& function.getType() == Function.TYPE_DFDS_ROLE) {
((NFunction) function).remove();
outs[0].remove();
}*/
}
} else if (ins.length == 1 && outs.length == 0) {
if (ins[0].getStart().getCrosspoint() == null)
if (ins[0].getEnd().getBorderType() >= 0)
ins[0].remove();
else {
Function function = ins[0].getEnd().getFunction();
if (function != null && function.getType() == Function.TYPE_DFDS_ROLE) {
((NFunction) function).remove();
ins[0].remove();
}
}
}
}
if (getIns().length == 0 && getOuts().length == 0) {
dataPlugin.removeCrosspoint(this);
}
// }
}
use of com.ramussoft.pb.Function in project ramus by Vitaliy-Yakovchuk.
the class HTTPParser method outFunctionModel.
private void outFunctionModel(final int format) throws IOException {
Row row = loadRowById();
if (row == null || !(row instanceof Function))
return;
row = replaceIDEF0Row(row);
final Function f = (Function) row;
int imageWidth = IMAGE_WIDTH;
String s = (String) params.get("w");
if (s != null) {
try {
imageWidth = new Integer(s).intValue();
if (imageWidth > 2000)
imageWidth = 2000;
} catch (final Exception e) {
}
}
int imageHeight = IMAGE_HEIGHT;
s = (String) params.get("h");
if (s != null) {
try {
imageHeight = new Integer(s).intValue();
if (imageHeight > 1600)
imageHeight = 1600;
} catch (final Exception e) {
}
}
final PIDEF0painter painter = new PIDEF0painter(f, new Dimension(imageWidth, imageHeight), dataPlugin);
painter.writeToStream(stream, format);
}
use of com.ramussoft.pb.Function in project ramus by Vitaliy-Yakovchuk.
the class HTTPParser method printRowBase.
private void printRowBase(final Row row) throws IOException {
htmlStream.print("<canter><h2 class=\"Ramus\">");
if (row instanceof Function)
htmlStream.print(MovingFunction.getIDEF0Kod((com.ramussoft.database.common.Row) row) + " " + row.getName());
else
htmlStream.print(row.getKod() + ". " + row.getName());
if (row.isElement()) {
Element element = StandardAttributesPlugin.getElement(dataPlugin.getEngine(), row.getElement().getQualifierId());
if (element != null) {
htmlStream.print(" [");
printStartATeg("rows/index.html?id=" + element.getId());
htmlStream.print(element.getName());
printEndATeg();
htmlStream.print("]");
}
}
htmlStream.println("</h2></canter>");
}
Aggregations