Class SExpressionExtractor
- java.lang.Object
-
- org.incenp.obofoundry.sssom.extract.MappingValueExtractor
-
- org.incenp.obofoundry.sssom.extract.SExpressionExtractor
-
- All Implemented Interfaces:
IValueExtractor
public class SExpressionExtractor extends MappingValueExtractor
Extracts the canonical S-expression that represents a mapping.This is used by expressions of the form
mapping(N).special.sexpr.
-
-
Field Summary
-
Fields inherited from class org.incenp.obofoundry.sssom.extract.MappingValueExtractor
mappingNo
-
-
Constructor Summary
Constructors Constructor Description SExpressionExtractor(int mappingNo)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectextract(Mapping mapping)Extracts the desired value from the given mapping.Class<?>getType()Gets the type of the value that would be returned byIValueExtractor.extract(MappingSet).-
Methods inherited from class org.incenp.obofoundry.sssom.extract.MappingValueExtractor
extract
-
-
-
-
Method Detail
-
extract
public Object extract(Mapping mapping)
Description copied from class:MappingValueExtractorExtracts the desired value from the given mapping.- Specified by:
extractin classMappingValueExtractor- Parameters:
mapping- The mapping from which to extract the value.- Returns:
- The desired value, or
nullif the mapping does not have 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).- Returns:
- The actual Java class of the object representing the extracted value.
-
-