insertBookmark(m_xCursor, name, id);
} else if (bkmk.isStart()) {
m_BookmarkStarts.put(name, m_xCursor.getStart());
} else {
XTextRange xRange = m_BookmarkStarts.get(name);
XParagraphCursor xCursor = mkCursor(xRange);
insertBookmark(xCursor, name, id);
}
} else if (type.equals("ReferenceMark")) {
ReferenceMarkNode mark = (ReferenceMarkNode) node;
String name = mark.getName();
if (mark.isPoint()) {
insertReferenceMark(m_xCursor, name);
} else if (mark.isStart()) {
m_ReferenceMarkStarts.put(name, m_xCursor.getStart());
} else {
XTextRange xRange = m_ReferenceMarkStarts.get(name);
XParagraphCursor xCursor = mkCursor(xRange);
insertReferenceMark(xCursor, name);
}
} else if (type.equals("DocumentIndexMark")) {
DocumentIndexMarkNode mark = (DocumentIndexMarkNode) node;
String name = mark.getName();
if (mark.isPoint()) {
insertDocumentIndexMark(m_xCursor, name);
} else if (mark.isStart()) {
m_DocumentIndexMarkStarts.put(name, m_xCursor.getStart());
} else {
XTextRange xRange = m_DocumentIndexMarkStarts.get(name);
XParagraphCursor xCursor = mkCursor(xRange);
insertDocumentIndexMark(xCursor, name);
}
} else if (type.equals("Hyperlink")) {
HyperlinkNode href = (HyperlinkNode) node;
XTextRange xRange = m_xCursor.getStart();
insertChildren(href.createEnumeration());
XParagraphCursor xCursor = mkCursor(xRange);
insertHyperlink(xCursor, href.getURL());
} else if (type.equals("Ruby")) {
RubyNode ruby = (RubyNode) node;
XTextRange xRange = m_xCursor.getStart();
insertChildren(ruby.createEnumeration());
XParagraphCursor xCursor = mkCursor(xRange);
insertRuby(xCursor, ruby.getRubyText());
} else if (type.equals("InContentMetadata")) {
MetaNode meta = (MetaNode) node;
XTextRange xRange = m_xCursor.getStart();
insertChildren(meta.createEnumeration());
XParagraphCursor xCursor = mkCursor(xRange);
insertMeta(xCursor, meta.getXmlId());
} else if (type.equals("MetadataField")) {
MetaFieldNode meta = (MetaFieldNode) node;
XTextRange xRange = m_xCursor.getStart();
insertChildren(meta.createEnumeration());
XParagraphCursor xCursor = mkCursor(xRange);
insertMetaField(xCursor, meta.getXmlId());
} else if (type.equals("Text")) {
TextNode text = (TextNode) node;
insertText(m_xCursor, text.getContent());
} else if (type.equals("TextField")) {