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

TransparencyZoomLevelVisibility changed to SemanticZoomLevelTransparency

parent da0a20af
No related branches found
No related tags found
1 merge request!765Resolve "Change CellD term about Semantic Zoom"
Pipeline #10027 failed
......@@ -46,6 +46,8 @@ minerva (12.3.0~alpha.0) unstable; urgency=low
* Small improvement: when adding new project columns "Root map", "Mapping
file" and "Map type" are merged (#700)
* Small improvement: allow admin to disable CORS check (#802)
* Small improvement: TransparencyZoomLevelVisibility parameter renamed to
SemanticZoomLevelTransparency (#801)
* Bug fix: progress bar of gene genome mapping upload is refreshing properly
(#728)
* Bug fix: when editing project Disease and Organism could not be removed
......
......@@ -128,7 +128,13 @@ public enum NoteField {
/**
* {@link Element#getSemanticZoomLevelVisibility()}.
*/
TRANSPARENCY_ZOOM_LEVEL_VISIBILITY("TransparencyZoomLevelVisibility", Element.class, null),
TRANSPARENCY_ZOOM_LEVEL_VISIBILITY("SemanticZoomLevelTransparency", Element.class, null),
/**
* {@link Element#getSemanticZoomLevelVisibility()}.
*/
@Deprecated
TRANSPARENCY_ZOOM_LEVEL_VISIBILITY_OLD("TransparencyZoomLevelVisibility", Element.class, null),
;
/**
......
......@@ -160,7 +160,7 @@ public class RestAnnotationParser {
return "";
}
} else if (value instanceof String) {
String string =(String) value;
String string = (String) value;
if (!(string.trim().isEmpty()) || forceFullInfo) {
return type.getCommonName() + ": " + XmlParser.escapeXml(string) + "\n";
} else {
......@@ -684,7 +684,14 @@ public class RestAnnotationParser {
String transparencyZoomLevelVisibility = getParamByPrefix(annotationString,
NoteField.TRANSPARENCY_ZOOM_LEVEL_VISIBILITY.getCommonName() + ":");
if (transparencyZoomLevelVisibility == null) {
return;
transparencyZoomLevelVisibility = getParamByPrefix(annotationString,
NoteField.TRANSPARENCY_ZOOM_LEVEL_VISIBILITY_OLD.getCommonName() + ":");
if (transparencyZoomLevelVisibility == null) {
return;
} else {
logger.warn("Deprecated parameter found: " + NoteField.TRANSPARENCY_ZOOM_LEVEL_VISIBILITY_OLD.getCommonName()
+ ". Use " + NoteField.TRANSPARENCY_ZOOM_LEVEL_VISIBILITY.getCommonName());
}
}
if (element.getTransparencyLevel() == null || element.getTransparencyLevel().isEmpty()) {
element.setTransparencyLevel(transparencyZoomLevelVisibility);
......
......@@ -107,6 +107,18 @@ public class CellDesignerXmlParserTest extends CellDesignerTestFunctions {
}
}
@Test
public void testParseTransparencyDeprecated() throws Exception {
try {
CellDesignerXmlParser parser = new CellDesignerXmlParser();
Model model = parser.createModel(new ConverterParams().filename("testFiles/model_with_transparency_old.xml"));
assertFalse(model.getCompartments().get(0).getTransparencyLevel().isEmpty());
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testParseVcard() throws Exception {
try {
......
......@@ -164,7 +164,7 @@
<head>
<title/>
</head>
<body>TransparencyZoomLevelVisibility:0
<body>SemanticZoomLevelTransparency:0
</body>
</html>
</notes>
......@@ -180,7 +180,7 @@
<head>
<title/>
</head>
<body>TransparencyZoomLevelVisibility:1
<body>SemanticZoomLevelTransparency:1
</body>
</html>
</notes>
......@@ -196,7 +196,7 @@
<head>
<title/>
</head>
<body>TransparencyZoomLevelVisibility:2
<body>SemanticZoomLevelTransparency:2
</body>
</html>
</notes>
......@@ -212,7 +212,7 @@
<head>
<title/>
</head>
<body>TransparencyZoomLevelVisibility:3
<body>SemanticZoomLevelTransparency:3
</body>
</html>
</notes>
......
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" xmlns:celldesigner="http://www.sbml.org/2001/ns/celldesigner" level="2" version="4">
<model metaid="untitled" id="untitled">
<annotation>
<celldesigner:extension>
<celldesigner:modelVersion>4.0</celldesigner:modelVersion>
<celldesigner:modelDisplay sizeX="600" sizeY="400"/>
<celldesigner:listOfCompartmentAliases>
<celldesigner:compartmentAlias id="ca1" compartment="c1">
<celldesigner:class>SQUARE</celldesigner:class>
<celldesigner:bounds x="15.0" y="73.0" w="137.0" h="153.0"/>
<celldesigner:namePoint x="75.0" y="190.5"/>
<celldesigner:doubleLine thickness="12.0" outerWidth="2.0" innerWidth="1.0"/>
<celldesigner:paint color="ffcccc00" scheme="Color"/>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
</celldesigner:compartmentAlias>
<celldesigner:compartmentAlias id="ca3" compartment="c3">
<celldesigner:class>SQUARE</celldesigner:class>
<celldesigner:bounds x="176.0" y="30.0" w="203.0" h="129.0"/>
<celldesigner:namePoint x="269.0" y="123.5"/>
<celldesigner:doubleLine thickness="12.0" outerWidth="2.0" innerWidth="1.0"/>
<celldesigner:paint color="ffcccc00" scheme="Color"/>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
</celldesigner:compartmentAlias>
<celldesigner:compartmentAlias id="ca4" compartment="c4">
<celldesigner:class>SQUARE</celldesigner:class>
<celldesigner:bounds x="443.0" y="69.0" w="149.0" h="178.0"/>
<celldesigner:namePoint x="509.0" y="211.5"/>
<celldesigner:doubleLine thickness="12.0" outerWidth="2.0" innerWidth="1.0"/>
<celldesigner:paint color="ffcccc00" scheme="Color"/>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
</celldesigner:compartmentAlias>
<celldesigner:compartmentAlias id="ca5" compartment="c5">
<celldesigner:class>SQUARE</celldesigner:class>
<celldesigner:bounds x="197.0" y="219.0" w="186.0" h="129.0"/>
<celldesigner:namePoint x="281.5" y="312.5"/>
<celldesigner:doubleLine thickness="12.0" outerWidth="2.0" innerWidth="1.0"/>
<celldesigner:paint color="ffcccc00" scheme="Color"/>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
</celldesigner:compartmentAlias>
</celldesigner:listOfCompartmentAliases>
<celldesigner:listOfComplexSpeciesAliases/>
<celldesigner:listOfSpeciesAliases>
<celldesigner:speciesAlias id="sa1" species="s1" compartmentAlias="ca1">
<celldesigner:activity>inactive</celldesigner:activity>
<celldesigner:bounds x="34.0" y="121.0" w="80.0" h="40.0"/>
<celldesigner:font size="12"/>
<celldesigner:view state="usual"/>
<celldesigner:usualView>
<celldesigner:innerPosition x="19.0" y="48.0"/>
<celldesigner:boxSize width="80.0" height="40.0"/>
<celldesigner:singleLine width="1.0"/>
<celldesigner:paint color="ffccffcc" scheme="Color"/>
</celldesigner:usualView>
<celldesigner:briefView>
<celldesigner:innerPosition x="0.0" y="0.0"/>
<celldesigner:boxSize width="80.0" height="60.0"/>
<celldesigner:singleLine width="0.0"/>
<celldesigner:paint color="3fff0000" scheme="Color"/>
</celldesigner:briefView>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
</celldesigner:speciesAlias>
<celldesigner:speciesAlias id="sa2" species="s2" compartmentAlias="ca3">
<celldesigner:activity>inactive</celldesigner:activity>
<celldesigner:bounds x="233.0" y="57.0" w="80.0" h="40.0"/>
<celldesigner:font size="12"/>
<celldesigner:view state="usual"/>
<celldesigner:usualView>
<celldesigner:innerPosition x="57.0" y="27.0"/>
<celldesigner:boxSize width="80.0" height="40.0"/>
<celldesigner:singleLine width="1.0"/>
<celldesigner:paint color="ffccffcc" scheme="Color"/>
</celldesigner:usualView>
<celldesigner:briefView>
<celldesigner:innerPosition x="0.0" y="0.0"/>
<celldesigner:boxSize width="80.0" height="60.0"/>
<celldesigner:singleLine width="0.0"/>
<celldesigner:paint color="3fff0000" scheme="Color"/>
</celldesigner:briefView>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
</celldesigner:speciesAlias>
<celldesigner:speciesAlias id="sa3" species="s3" compartmentAlias="ca4">
<celldesigner:activity>inactive</celldesigner:activity>
<celldesigner:bounds x="473.0" y="137.0" w="80.0" h="40.0"/>
<celldesigner:font size="12"/>
<celldesigner:view state="usual"/>
<celldesigner:usualView>
<celldesigner:innerPosition x="30.0" y="68.0"/>
<celldesigner:boxSize width="80.0" height="40.0"/>
<celldesigner:singleLine width="1.0"/>
<celldesigner:paint color="ffccffcc" scheme="Color"/>
</celldesigner:usualView>
<celldesigner:briefView>
<celldesigner:innerPosition x="0.0" y="0.0"/>
<celldesigner:boxSize width="80.0" height="60.0"/>
<celldesigner:singleLine width="0.0"/>
<celldesigner:paint color="3fff0000" scheme="Color"/>
</celldesigner:briefView>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
</celldesigner:speciesAlias>
<celldesigner:speciesAlias id="sa4" species="s4" compartmentAlias="ca5">
<celldesigner:activity>inactive</celldesigner:activity>
<celldesigner:bounds x="277.0" y="263.0" w="80.0" h="40.0"/>
<celldesigner:font size="12"/>
<celldesigner:view state="usual"/>
<celldesigner:usualView>
<celldesigner:innerPosition x="80.0" y="44.0"/>
<celldesigner:boxSize width="80.0" height="40.0"/>
<celldesigner:singleLine width="1.0"/>
<celldesigner:paint color="ffccffcc" scheme="Color"/>
</celldesigner:usualView>
<celldesigner:briefView>
<celldesigner:innerPosition x="0.0" y="0.0"/>
<celldesigner:boxSize width="80.0" height="60.0"/>
<celldesigner:singleLine width="0.0"/>
<celldesigner:paint color="3fff0000" scheme="Color"/>
</celldesigner:briefView>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
</celldesigner:speciesAlias>
</celldesigner:listOfSpeciesAliases>
<celldesigner:listOfGroups/>
<celldesigner:listOfProteins>
<celldesigner:protein id="pr1" name="s1" type="GENERIC"/>
</celldesigner:listOfProteins>
<celldesigner:listOfGenes/>
<celldesigner:listOfRNAs/>
<celldesigner:listOfAntisenseRNAs/>
<celldesigner:listOfLayers/>
<celldesigner:listOfBlockDiagrams/>
</celldesigner:extension>
</annotation>
<listOfUnitDefinitions>
<unitDefinition metaid="substance" id="substance" name="substance">
<listOfUnits>
<unit metaid="CDMT00001" kind="mole"/>
</listOfUnits>
</unitDefinition>
<unitDefinition metaid="volume" id="volume" name="volume">
<listOfUnits>
<unit metaid="CDMT00002" kind="litre"/>
</listOfUnits>
</unitDefinition>
<unitDefinition metaid="area" id="area" name="area">
<listOfUnits>
<unit metaid="CDMT00003" kind="metre" exponent="2"/>
</listOfUnits>
</unitDefinition>
<unitDefinition metaid="length" id="length" name="length">
<listOfUnits>
<unit metaid="CDMT00004" kind="metre"/>
</listOfUnits>
</unitDefinition>
<unitDefinition metaid="time" id="time" name="time">
<listOfUnits>
<unit metaid="CDMT00005" kind="second"/>
</listOfUnits>
</unitDefinition>
</listOfUnitDefinitions>
<listOfCompartments>
<compartment metaid="default" id="default" size="1" units="volume"/>
<compartment metaid="c1" id="c1" name="c1" size="1" units="volume" outside="default">
<notes>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title/>
</head>
<body>TransparencyZoomLevelVisibility:0
</body>
</html>
</notes>
<annotation>
<celldesigner:extension>
<celldesigner:name>c1</celldesigner:name>
</celldesigner:extension>
</annotation>
</compartment>
<compartment metaid="c3" id="c3" name="c3" size="1" units="volume" outside="default">
<notes>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title/>
</head>
<body>TransparencyZoomLevelVisibility:1
</body>
</html>
</notes>
<annotation>
<celldesigner:extension>
<celldesigner:name>c3</celldesigner:name>
</celldesigner:extension>
</annotation>
</compartment>
<compartment metaid="c4" id="c4" name="c4" size="1" units="volume" outside="default">
<notes>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title/>
</head>
<body>TransparencyZoomLevelVisibility:2
</body>
</html>
</notes>
<annotation>
<celldesigner:extension>
<celldesigner:name>c4</celldesigner:name>
</celldesigner:extension>
</annotation>
</compartment>
<compartment metaid="c5" id="c5" name="c5" size="1" units="volume" outside="default">
<notes>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title/>
</head>
<body>TransparencyZoomLevelVisibility:3
</body>
</html>
</notes>
<annotation>
<celldesigner:extension>
<celldesigner:name>c5</celldesigner:name>
</celldesigner:extension>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species metaid="s1" id="s1" name="s1" compartment="c1" initialAmount="0">
<annotation>
<celldesigner:extension>
<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment>
<celldesigner:speciesIdentity>
<celldesigner:class>PROTEIN</celldesigner:class>
<celldesigner:proteinReference>pr1</celldesigner:proteinReference>
</celldesigner:speciesIdentity>
</celldesigner:extension>
</annotation>
</species>
<species metaid="s2" id="s2" name="s1" compartment="c3" initialAmount="0">
<annotation>
<celldesigner:extension>
<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment>
<celldesigner:speciesIdentity>
<celldesigner:class>PROTEIN</celldesigner:class>
<celldesigner:proteinReference>pr1</celldesigner:proteinReference>
</celldesigner:speciesIdentity>
</celldesigner:extension>
</annotation>
</species>
<species metaid="s3" id="s3" name="s1" compartment="c4" initialAmount="0">
<annotation>
<celldesigner:extension>
<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment>
<celldesigner:speciesIdentity>
<celldesigner:class>PROTEIN</celldesigner:class>
<celldesigner:proteinReference>pr1</celldesigner:proteinReference>
</celldesigner:speciesIdentity>
</celldesigner:extension>
</annotation>
</species>
<species metaid="s4" id="s4" name="s1" compartment="c5" initialAmount="0">
<annotation>
<celldesigner:extension>
<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment>
<celldesigner:speciesIdentity>
<celldesigner:class>PROTEIN</celldesigner:class>
<celldesigner:proteinReference>pr1</celldesigner:proteinReference>
</celldesigner:speciesIdentity>
</celldesigner:extension>
</annotation>
</species>
</listOfSpecies>
</model>
</sbml>
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