Skip to content
Snippets Groups Projects
Commit 8c6d4271 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

variable name refactored

parent ec56cb96
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!545Import from sbgn issue
......@@ -469,32 +469,32 @@ public class SbgnmlXmlExporter {
* Returns glyph with unit of information extracted from the alias or null if no
* unit of information was found.
*
* @param alias
* @param element
* input alias
* @return glyph with unit of information extracted from the alias or null if no
* unit of information was found
*/
private Glyph getUnitOfInformationGlyph(Element alias) {
private Glyph getUnitOfInformationGlyph(Element element) {
Glyph uoiGlyph = null;
String uoiText = "";
if (alias instanceof Species) {
Species species = (Species) alias;
if (element instanceof Species) {
Species species = (Species) element;
int homodir = species.getHomodimer();
if (homodir > 1) {
uoiText = "N:".concat(Integer.toString(homodir));
}
}
if (alias instanceof TruncatedProtein) {
if (element instanceof TruncatedProtein) {
if (!uoiText.equals("")) {
uoiText = uoiText.concat("; ");
}
uoiText = uoiText.concat("ct:truncatedProtein");
}
if (alias instanceof Species) {
Species speciesAlias = (Species) alias;
if (element instanceof Species) {
Species speciesAlias = (Species) element;
if ((speciesAlias.getStateLabel() != null) && (speciesAlias.getStatePrefix() != null)) {
if (!uoiText.equals("")) {
uoiText = uoiText.concat("; ");
......@@ -507,19 +507,19 @@ public class SbgnmlXmlExporter {
}
if (!uoiText.contains("ct:")) {
if (alias instanceof Rna) {
if (element instanceof Rna) {
if (!uoiText.equals("")) {
uoiText = uoiText.concat("; ");
}
uoiText = uoiText.concat("ct:RNA");
}
if (alias instanceof AntisenseRna) {
if (element instanceof AntisenseRna) {
if (!uoiText.equals("")) {
uoiText = uoiText.concat("; ");
}
uoiText = uoiText.concat("ct:antisenseRNA");
}
if (alias instanceof Gene) {
if (element instanceof Gene) {
if (!uoiText.equals("")) {
uoiText = uoiText.concat("; ");
}
......@@ -530,17 +530,17 @@ public class SbgnmlXmlExporter {
if (!uoiText.equals("")) {
uoiGlyph = new Glyph();
uoiGlyph.setClazz(GlyphClazz.UNIT_OF_INFORMATION.getClazz());
uoiGlyph.setId(alias.getElementId().concat("uoi"));
uoiGlyph.setId(element.getElementId().concat("uoi"));
Label label = new Label();
label.setText(uoiText);
uoiGlyph.setLabel(label);
Bbox bbox = new Bbox();
bbox.setX((float) (alias.getX() + UNIT_OF_INFORMATION_MARGIN));
bbox.setY((float) (alias.getY() - UNIT_OF_INFORMATION_HEIGHT / 2));
bbox.setX((float) (element.getX() + UNIT_OF_INFORMATION_MARGIN));
bbox.setY((float) (element.getY() - UNIT_OF_INFORMATION_HEIGHT / 2));
bbox.setH((float) UNIT_OF_INFORMATION_HEIGHT);
bbox.setW((float) (alias.getWidth() - 2 * UNIT_OF_INFORMATION_MARGIN));
bbox.setW((float) (element.getWidth() - 2 * UNIT_OF_INFORMATION_MARGIN));
uoiGlyph.setBbox(bbox);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment