Package 

Class SpellCheckedMultiMetadata

  • All Implemented Interfaces:
    ai.platon.pulsar.common.DublinCore , ai.platon.pulsar.common.HttpHeaders , ai.platon.pulsar.common.config.AppConstants

    
    public class SpellCheckedMultiMetadata
    extends MultiMetadata
                        

    A decorator to MultiMetadata that adds spellchecking capabilities to property names. Currently used spelling vocabulary contains just the httpheaders from ai.platon.pulsar.common.HttpHeaders class.

    • Method Summary

      Modifier and Type Method Description
      static String getNormalizedName(String name) Get the normalized name of metadata attribute name.
      void removeAll(String name) Remove a data and all its associated values.
      void put(String name, String value) Add a data name/value mapping.
      Collection<String> getValues(String name) Get the values associated to a data name.
      String get(String name) Get the value associated to a data name.
      void set(String name, String value) set.
      • Methods inherited from class ai.platon.pulsar.persist.metadata.MultiMetadata

        asMultimap, clear, equals, get, getBoolean, getInstant, getInt, getLong, getNonNullValues, isMultiValued, names, put, put, put, put, put, putAll, putAll, set, toString
      • Methods inherited from class java.lang.Object

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

      • getNormalizedName

         static String getNormalizedName(String name)

        Get the normalized name of metadata attribute name. This method tries tofind a well-known metadata name (one of the metadata names defined in thisclass) that matches the specified name. The matching is error tolerent. Forinstance,

        • content-type gives Content-Type
        • CoNtEntType gives Content-Type
        • ConTnTtYpe gives Content-Type
        If no matching with a well-known metadata name is found, then the originalname is returned.
        Parameters:
        name - Name to normalize
      • removeAll

         void removeAll(String name)

        Remove a data and all its associated values.

      • put

         void put(String name, String value)

        Add a data name/value mapping. Add the specified value to the list ofvalues associated to the specified data name.

      • get

         String get(String name)

        Get the value associated to a data name. If many values are assiociatedto the specified name, then the first one is returned.