Skip to content
Snippets Groups Projects
Commit 310dcb62 authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

Resolving bug on datatype attributes

parent 85c62375
No related branches found
No related tags found
No related merge requests found
File moved
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -1224,7 +1224,13 @@ public class AvatarBDBlock extends TGCScalableWithInternalComponent implements S
typeOther = "";
}
id = elt.getAttribute("id");
valueAtt = elt.getAttribute("value");
try {
valueAtt = elt.getAttribute("value");
} catch (Exception e) {
valueAtt = "";
}
if (valueAtt == null) {
valueAtt = "";
......
......@@ -511,7 +511,12 @@ public class AvatarBDDataType extends TGCScalableWithInternalComponent implement
typeOther = "";
}
id = elt.getAttribute("id");
valueAtt = elt.getAttribute("value");
try {
valueAtt = elt.getAttribute("value");
} catch (Exception e) {
valueAtt = "";
}
if (valueAtt == null) {
......@@ -521,14 +526,18 @@ public class AvatarBDDataType extends TGCScalableWithInternalComponent implement
if (valueAtt.equals("null")) {
valueAtt = "";
}
if ((TAttribute.isAValidId(id, false, false, false)) && (TAttribute.isAValidInitialValue(type, valueAtt))) {
//
if (type == TAttribute.NATURAL) {
type = TAttribute.INTEGER;
if ((TAttribute.isAValidId(id, false, false, false))) {
if ((valueAtt.length() == 0 ) || ((TAttribute.isAValidInitialValue(type, valueAtt)))) {
if (type == TAttribute.NATURAL) {
type = TAttribute.INTEGER;
}
TAttribute ta = new TAttribute(access, id, valueAtt, type, typeOther);
ta.isAvatar = true;
myAttributes.add(ta);
}
TAttribute ta = new TAttribute(access, id, valueAtt, type, typeOther);
ta.isAvatar = true;
myAttributes.add(ta);
}
}
}
......
......@@ -31,6 +31,7 @@ dependencies {
compile name: 'batik-codec'
compile name: 'batik-constants'
compile name: 'batik-xml'
compile name: 'batik-extensions'
compile name: 'batik-ext'
compile name: 'batik-util'
compile name: 'batik-svggen'
......
Main-Class: Main
Class-Path: ./opencloud.jar ./JavaPlot.jar ./derbynet.jar ./commons-math3-3.6.1.jar ./jsoup-1.8.1.jar ./commons-codec-1.10.jar ./gs-core-1.3.jar ./gs-ui-1.3.jar ./commons-io-2.5.jar ./batik-codec.jar ./batik-constants.jar ./batik-xml.jar ./batik-ext.jar ./batik-util.jar ./batik-svggen.jar ./batik-dom.jar ./batik-awt-util.jar xml-apis.jar ./batik-awt-util.jar ./batik-dom.jar ./batik-svggen.jar ./batik-util.jar ./batik-xml.jar ./jautomata-core.jar ./com.microsoft.z3.jar
./jgrapht-core-1.3.0.jar ./jgrapht-ext-1.3.0.jar ./jgrapht-io-1.3.0.jar ./jgraphx-3.4.1.3.jar
Class-Path: ./opencloud.jar ./JavaPlot.jar ./derbynet.jar ./commons-math3-3.6.1.jar ./jsoup-1.8.1.jar ./commons-codec-1.10.jar ./gs-core-1.3.jar ./gs-ui-1.3.jar ./commons-io-2.5.jar ./batik-codec.jar ./batik-constants.jar ./batik-xml.jar ./batik-ext.jar ./batik-extensions.jar ./batik-util.jar ./batik-svggen.jar ./batik-dom.jar ./batik-awt-util.jar xml-apis.jar ./jautomata-core.jar ./com.microsoft.z3.jar ./jgrapht-core-1.3.0.jar ./jgrapht-ext-1.3.0.jar ./jgrapht-io-1.3.0.jar ./jgraphx-3.4.1.3.jar
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