Add method to get the plain text of a part.
[Sone.git] / src / main / java / net / pterodactylus / sone / text / SonePart.java
index 475c091..37f098b 100644 (file)
@@ -18,6 +18,7 @@
 package net.pterodactylus.sone.text;
 
 import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.template.SoneAccessor;
 
 /**
  * {@link Part} implementation that stores a reference to a {@link Sone}.
@@ -52,4 +53,16 @@ public class SonePart implements Part {
                return sone;
        }
 
+       //
+       // PART METHODS
+       //
+
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public String getText() {
+               return SoneAccessor.getNiceName(sone);
+       }
+
 }