Class MappingSetExtensionExtractor
- java.lang.Object
-
- org.incenp.obofoundry.sssom.extract.MappingSetExtensionExtractor
-
- All Implemented Interfaces:
IValueExtractor
public class MappingSetExtensionExtractor extends Object implements IValueExtractor
Extracts the value of an extension slot from a mapping set object.This is the extractor used by an expression of the form
set.extension(PROPERTY).
-
-
Constructor Summary
Constructors Constructor Description MappingSetExtensionExtractor(String property)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectextract(MappingSet ms)Extracts the desired value from the given mapping set.Class<?>getType()Gets the type of the value that would be returned byIValueExtractor.extract(MappingSet).
-
-
-
Field Detail
-
property
protected String property
-
-
Constructor Detail
-
MappingSetExtensionExtractor
public MappingSetExtensionExtractor(String property)
Creates a new instance.- Parameters:
property- The name of the property representing the extension slot to extract.
-
-
Method Detail
-
extract
public Object extract(MappingSet ms)
Description copied from interface:IValueExtractorExtracts the desired value from the given mapping set.- Specified by:
extractin interfaceIValueExtractor- Parameters:
ms- The mapping set from which to extract the value.- Returns:
- The desired value, or
nullif the set does not contain a value at the specified location.
-
getType
public Class<?> getType()
Description copied from interface:IValueExtractorGets the type of the value that would be returned byIValueExtractor.extract(MappingSet).- Specified by:
getTypein interfaceIValueExtractor- Returns:
- The actual Java class of the object representing the extracted value.
-
-