use of org.eclipse.sapphire.modeling.xml.XmlElement in project liferay-ide by liferay.
the class WorkflowMetadataBindingImpl method readUnderlyingObject.
@Override
protected Object readUnderlyingObject() {
WorkflowNodeMetadataObject metadataObject = null;
Element element = property().element();
Resource resource = element.resource();
XmlResource xmlResource = resource.adapt(XmlResource.class);
XmlElement xmlElement = xmlResource.getXmlElement();
XmlElement metadataElement = xmlElement.getChildElement("metadata", false);
if (metadataElement != null) {
String metadata = metadataElement.getChildNodeText("");
if (!CoreUtil.empty(metadata)) {
metadataObject = new WorkflowNodeMetadataObject(metadata.trim());
}
}
if (metadataObject == null) {
metadataObject = new WorkflowNodeMetadataObject();
}
if (!metadataObject.equals(_underlyingObject)) {
_underlyingObject = metadataObject;
}
return _underlyingObject;
}
use of org.eclipse.sapphire.modeling.xml.XmlElement in project liferay-ide by liferay.
the class CDataValueBindingImpl method write.
@Override
public void write(String value) {
XmlElement xmlElement = xml(true);
XmlNode childNode = xmlElement.getChildNode(_path, true);
Node cdataNode = childNode.getDomNode();
CoreUtil.removeChildren(cdataNode);
Document document = cdataNode.getOwnerDocument();
cdataNode.insertBefore(document.createCDATASection(value), null);
}
use of org.eclipse.sapphire.modeling.xml.XmlElement in project liferay-ide by liferay.
the class CDataValueBindingImpl method read.
@Override
public String read() {
String retval = null;
XmlElement xmlElement = xml(false);
if (xmlElement != null) {
retval = xmlElement.getChildNodeText(_path);
}
return retval;
}
use of org.eclipse.sapphire.modeling.xml.XmlElement in project liferay-ide by liferay.
the class CDATAValueBinding method write.
@Override
public void write(String value) {
XmlElement xmlElement = xml(true);
Node childNode = xmlElement.getChildNode(this.path, true).getDomNode();
CoreUtil.removeChildren(childNode);
Document document = childNode.getOwnerDocument();
childNode.insertBefore(document.createCDATASection(value), null);
}
use of org.eclipse.sapphire.modeling.xml.XmlElement in project liferay-ide by liferay.
the class CDATAValueBinding method read.
@Override
public String read() {
String retval = null;
XmlElement xmlElement = xml(false);
if (xmlElement != null) {
retval = xmlElement.getChildNodeText(this.path);
}
return retval;
}
Aggregations