Skip to content
Snippets Groups Projects
Commit ce9140e5 authored by gpawel's avatar gpawel
Browse files

LMS-2773 YeastLab: managed properties stopped working

SVN: 24361
parent 72893b70
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ import org.w3c.dom.NodeList;
import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel;
import ch.systemsx.cisd.common.shared.basic.utils.StringUtils;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ManagedProperty;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.api.IManagedProperty;
import ch.systemsx.cisd.openbis.generic.shared.managed_property.api.EntityLinkElementKind;
import ch.systemsx.cisd.openbis.generic.shared.managed_property.api.IElement;
......@@ -61,13 +62,12 @@ public class XmlStructuredPropertyConverter implements IStructuredPropertyConver
public List<IElement> convertToElements(IManagedProperty property)
{
return property.isSpecialValue() ? Collections.<IElement> emptyList()
: convertStringToElements(property.getValue());
return convertStringToElements(property.getValue());
}
public List<IElement> convertStringToElements(String propertyValue)
{
if (StringUtils.isBlank(propertyValue))
if (ManagedProperty.isSpecialValue(propertyValue) || StringUtils.isBlank(propertyValue))
{
return Collections.<IElement> emptyList();
}
......@@ -93,7 +93,7 @@ public class XmlStructuredPropertyConverter implements IStructuredPropertyConver
root.setChildren(elements);
return root;
}
private Node transformToDOM(IElement element, Document document)
{
Node result = document.createElement(element.getName());
......@@ -110,7 +110,6 @@ public class XmlStructuredPropertyConverter implements IStructuredPropertyConver
return result;
}
private IElement transformFromDOM(Node node)
{
IElement result = createElementForNode(node);
......@@ -172,7 +171,7 @@ public class XmlStructuredPropertyConverter implements IStructuredPropertyConver
{
String permId = getAttrValueOrFail(node, EntityLinkElement.PERMID_ATTR_NAME);
return new EntityLinkElement(linkKind, permId);
}
}
// plain element, no special treatment needed
return factory.createElement(nodeName);
......
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