From ed074b78dbb2a0d15ccb985b1e9531aace0fd4ea Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 13 Feb 2016 21:25:42 +0000 Subject: Read footnote references --- .../mammoth/documents/DocumentElementVisitor.java | 2 +- .../org/zwobble/mammoth/documents/NoteReference.java | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/zwobble/mammoth/documents/NoteReference.java (limited to 'src/main/java/org/zwobble/mammoth/documents') diff --git a/src/main/java/org/zwobble/mammoth/documents/DocumentElementVisitor.java b/src/main/java/org/zwobble/mammoth/documents/DocumentElementVisitor.java index b4cd390..f3a4ca4 100644 --- a/src/main/java/org/zwobble/mammoth/documents/DocumentElementVisitor.java +++ b/src/main/java/org/zwobble/mammoth/documents/DocumentElementVisitor.java @@ -14,5 +14,5 @@ public interface DocumentElementVisitor { T visit(Hyperlink hyperlink); T visit(Bookmark bookmark); - + T visit(NoteReference noteReference); } diff --git a/src/main/java/org/zwobble/mammoth/documents/NoteReference.java b/src/main/java/org/zwobble/mammoth/documents/NoteReference.java new file mode 100644 index 0000000..05311c0 --- /dev/null +++ b/src/main/java/org/zwobble/mammoth/documents/NoteReference.java @@ -0,0 +1,18 @@ +package org.zwobble.mammoth.documents; + +public class NoteReference implements DocumentElement { + public static NoteReference footnoteReference(String noteId) { + return new NoteReference(noteId); + } + + private final String noteId; + + public NoteReference(String noteId) { + this.noteId = noteId; + } + + @Override + public T accept(DocumentElementVisitor visitor) { + return visitor.visit(this); + } +} -- cgit v1.2.3