Class FieldView

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    DocumentSummary

    public class FieldView
    extends java.lang.Object
    implements java.io.Serializable
    Since:
    2010-02-19
    Author:
    baldersheim
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      FieldView​(java.lang.String name)
      Creates a view with a name
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FieldView add​(com.yahoo.document.Field field)
      This method will add a field to a view.
      FieldView add​(FieldView view)
      This method will join the two views.
      com.yahoo.document.Field get​(java.lang.String name)  
      java.util.Collection<com.yahoo.document.Field> getFields()  
      java.lang.String getName()  
      void remove​(java.lang.String name)  
      • Methods inherited from class java.lang.Object

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

      • FieldView

        public FieldView​(java.lang.String name)
        Creates a view with a name
        Parameters:
        name - Name of the view.
    • Method Detail

      • getName

        public java.lang.String getName()
      • getFields

        public java.util.Collection<com.yahoo.document.Field> getFields()
      • get

        public com.yahoo.document.Field get​(java.lang.String name)
      • remove

        public void remove​(java.lang.String name)
      • add

        public FieldView add​(com.yahoo.document.Field field)
        This method will add a field to a view. All fields must come from the same document type. Not enforced here.
        Parameters:
        field - The field to add.
        Returns:
        Itself for chaining purposes.
      • add

        public FieldView add​(FieldView view)
        This method will join the two views.
        Parameters:
        view - The view to be joined in to this.
        Returns:
        Itself for chaining.