Class MappingExtensionExtractor

java.lang.Object
org.incenp.obofoundry.sssom.extract.MappingValueExtractor
org.incenp.obofoundry.sssom.extract.MappingExtensionExtractor
All Implemented Interfaces:
IValueExtractor

public class MappingExtensionExtractor extends MappingValueExtractor
Extracts the value of an extension slot from a mapping object.

This is the extractor used by an expression of the form mapping(N).extension(PROPERTY).

  • Field Details

    • property

      protected String property
  • Constructor Details

    • MappingExtensionExtractor

      public MappingExtensionExtractor(int mappingNo, String property)
      Creates a new instance.
      Parameters:
      mappingNo - The 0-based index of the mapping from which to extract the extension value, or (if negative) the 1-based index starting from the last mapping.
      property - The name of the property representing the extension slot to extract.
  • Method Details

    • extract

      protected Object extract(Mapping mapping)
      Description copied from class: MappingValueExtractor
      Extracts the desired value from the given mapping.
      Specified by:
      extract in class MappingValueExtractor
      Parameters:
      mapping - The mapping from which to extract the value.
      Returns:
      The desired value, or null if the mapping does not have a value at the specified location.
    • getType

      public Class<?> getType()
      Description copied from interface: IValueExtractor
      Gets the type of the value that would be returned by IValueExtractor.extract(MappingSet).
      Returns:
      The actual Java class of the object representing the extracted value.