Fix freemind import/export notes.
This commit is contained in:
@@ -225,7 +225,7 @@ public class FreemindExporter
|
||||
private void addNote(com.wisemapping.jaxb.freemind.Node fnode, com.wisemapping.jaxb.wisemap.TopicType mindmapTopic) throws IOException, SAXException, ParserConfigurationException {
|
||||
final Note note = mindmapTopic.getNote();
|
||||
if (note != null) {
|
||||
final String noteStr = note.getText() != null ? note.getText() : note.getTextAttr();
|
||||
final String noteStr = note.getValue() != null ? note.getValue() : note.getTextAttr();
|
||||
if (noteStr != null) {
|
||||
final Richcontent richcontent = buildRichContent(noteStr, "NOTE");
|
||||
fnode.getArrowlinkOrCloudOrEdge().add(richcontent);
|
||||
|
@@ -43,7 +43,7 @@ public class JaxbCDATAMarshaller {
|
||||
// When processing xml that doesn't use namespaces, simply omit the
|
||||
// namespace prefix as shown in the third CDataElement below.
|
||||
of.setCDataElements(
|
||||
new String[]{"^text"}); //
|
||||
new String[]{"^text","^note"}); //
|
||||
|
||||
// set any other options you'd like
|
||||
// of.setPreserveSpace(true);
|
||||
|
@@ -298,7 +298,7 @@ public class FreemindImporter
|
||||
if (textNote == null) // It is not a note is a BlinkingNodeHook or AutomaticLayout Hook
|
||||
{
|
||||
textNote = EMPTY_NOTE;
|
||||
mindmapNote.setText(textNote);
|
||||
mindmapNote.setValue(textNote);
|
||||
currentWiseTopic.setNote(mindmapNote);
|
||||
}
|
||||
} else if (element instanceof Richcontent) {
|
||||
@@ -312,7 +312,7 @@ public class FreemindImporter
|
||||
String text = html2text(content);
|
||||
final com.wisemapping.jaxb.wisemap.Note mindmapNote = new com.wisemapping.jaxb.wisemap.Note();
|
||||
text = text != null ? text : EMPTY_NOTE;
|
||||
mindmapNote.setText(text);
|
||||
mindmapNote.setValue(text);
|
||||
currentWiseTopic.setNote(mindmapNote);
|
||||
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<jxb:bindings node="/xsd:schema/xsd:complexType[@name='topicType']/xsd:attribute[@name='text']" schemaLocation="mindmap.xsd">
|
||||
<jxb:property name="textAttr"/>
|
||||
</jxb:bindings>
|
||||
<jxb:bindings node="/xsd:schema/xsd:complexType[@name='note']/xsd:attribute[@name='text']" schemaLocation="mindmap.xsd">
|
||||
<jxb:bindings node="/xsd:schema/xsd:complexType[@name='note']/xsd:simpleContent/xsd:extension/xsd:attribute[@name='text']" schemaLocation="mindmap.xsd">
|
||||
<jxb:property name="textAttr"/>
|
||||
</jxb:bindings>
|
||||
</jxb:bindings>
|
@@ -48,10 +48,11 @@
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="note">
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs='0' maxOccurs='1' type="xsd:string" name="text"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="text" type="xsd:string"/>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="text" type="xsd:string"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="relationship" type="relationshipType"/>
|
||||
|
Reference in New Issue
Block a user