Class TextItem

java.lang.Object
com.esprow.oapi.util.TextItem
All Implemented Interfaces:
MixedContent.Item

public class TextItem extends Object
The text item corresponding to Text or CDATA XML node.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Create an item with a given value
    protected
    TextItem(org.eclipse.emf.ecore.util.FeatureMap.Entry entry)
    Create unresolved item
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.eclipse.emf.ecore.util.FeatureMap.Entry
    Create an entry corresponding to the given value object.
    Returns the actual value.
    static String
    Removes all leading and trailing space, as well as indentation space, from the given string.
    protected String
    resolve(org.eclipse.emf.ecore.util.FeatureMap.Entry entry)
    Create a value object instance from the given entry.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TextItem

      public TextItem(String value)
      Create an item with a given value
      Parameters:
      value - the text
    • TextItem

      protected TextItem(org.eclipse.emf.ecore.util.FeatureMap.Entry entry)
      Create unresolved item
      Parameters:
      entry - the text entry to be wrapped
  • Method Details

    • createEntry

      protected org.eclipse.emf.ecore.util.FeatureMap.Entry createEntry(String object)
      Create an entry corresponding to the given value object. This method is called by the framework once the client creates new Item.
      Parameters:
      object - the value object
      Returns:
      the feature map entry
    • resolve

      protected String resolve(org.eclipse.emf.ecore.util.FeatureMap.Entry entry)
      Create a value object instance from the given entry. This method is called by the framework once the client requests the actual value.
      Parameters:
      entry - the feature map entry
      Returns:
      the value object
    • multiLineTrim

      public static String multiLineTrim(String text)
      Removes all leading and trailing space, as well as indentation space, from the given string. Indentation space is a set of whitespace and tab characters at the beginning of each line in a multi-line string.
      Parameters:
      text - the input string
      Returns:
      the trimmed string
    • getValue

      public String getValue()
      Description copied from interface: MixedContent.Item
      Returns the actual value.
      Specified by:
      getValue in interface MixedContent.Item
      Returns:
      the value object