use of com.ramussoft.common.Attribute in project ramus by Vitaliy-Yakovchuk.
the class ChartPlugin method createDouble.
private Attribute createDouble(String attributeName) {
Attribute attribute = engine.createSystemAttribute(new AttributeType("Core", "Double"));
attribute.setName(attributeName);
engine.updateAttribute(attribute);
return attribute;
}
use of com.ramussoft.common.Attribute in project ramus by Vitaliy-Yakovchuk.
the class ChartPlugin method createCharts.
private Qualifier createCharts() {
Qualifier qualifier = engine.createSystemQualifier();
qualifier.setName(QUALIFIER_CHARTS);
Attribute attribute = StandardAttributesPlugin.getAttributeNameAttribute(engine);
qualifier.getAttributes().add(attribute);
qualifier.getSystemAttributes().add(StandardAttributesPlugin.getHierarchicalAttribute(engine));
qualifier.setAttributeForName(attribute.getId());
engine.updateQualifier(qualifier);
return qualifier;
}
use of com.ramussoft.common.Attribute in project ramus by Vitaliy-Yakovchuk.
the class ChartPlugin method createLong.
private Attribute createLong(String attributeName) {
Attribute attribute = engine.createSystemAttribute(new AttributeType("Core", "Long"));
attribute.setName(attributeName);
engine.updateAttribute(attribute);
return attribute;
}
use of com.ramussoft.common.Attribute in project ramus by Vitaliy-Yakovchuk.
the class NFunction method setName.
@Override
public void setName(String name) {
Row row = dataPlugin.findRowByGlobalId(getLink());
if (row != null)
row.setName(name);
else {
Attribute attribute = engine.getAttribute(rowSet.getQualifier().getAttributeForName());
if (attribute.getAttributeType().toString().equals("IDEF0.DFDSName")) {
DFDSName dfdsName = new DFDSName();
int r = name.indexOf('\n');
if (r >= 0) {
dfdsName.setShortName(name.substring(0, r));
dfdsName.setLongName(name.substring(r + 1));
} else {
dfdsName.setShortName(name);
dfdsName.setLongName("");
}
setNameObject(dfdsName);
} else
super.setName(name);
}
}
use of com.ramussoft.common.Attribute in project ramus by Vitaliy-Yakovchuk.
the class NFunction method setOwner.
public void setOwner(final Row owner) {
Function ow = null;
if (getType() == Function.TYPE_DFDS_ROLE) {
ow = (Function) owner;
if (ow == null)
ow = (Function) getOwner();
}
if (owner == null) {
setObject(OWNER_ID, null);
} else {
setObject(OWNER_ID, ((NRow) owner).getElementId());
}
Function function = (Function) getParent();
if (function.getDecompositionType() == MovingArea.DIAGRAM_TYPE_DFDS) {
HashSet<Sector> toUpdate = new HashSet<Sector>();
if (getType() == Function.TYPE_DFDS_ROLE) {
if (ow != null) {
for (Sector sector : function.getSectors()) {
if (ow.equals(sector.getStart().getFunction()) || ow.equals(sector.getEnd().getFunction()))
if (!toUpdate.contains(sector))
toUpdate.add(sector);
}
}
} else {
for (Sector sector : function.getSectors()) {
if (this.equals(sector.getStart().getFunction()) || this.equals(sector.getEnd().getFunction()))
if (!toUpdate.contains(sector))
toUpdate.add(sector);
}
}
for (Sector sector : toUpdate) SectorRefactor.fixOwners(sector, getDataPlugin());
}
for (Attribute attribute : engine.getQualifier(getElement().getQualifierId()).getAttributes()) if (attribute.getAttributeType().equals(DFDSNamePlugin.type)) {
DFDSName dfdsName = (DFDSName) engine.getAttribute(getElement(), attribute);
if (dfdsName != null)
dataPlugin.compileDFDSName(dfdsName, this);
}
}
Aggregations