Package org.n52.io.response.extension
Class MetadataExtension<T extends ParameterOutput>
- java.lang.Object
-
- org.n52.io.response.extension.MetadataExtension<T>
-
- Direct Known Subclasses:
LicenseExtension
public abstract class MetadataExtension<T extends ParameterOutput> extends Object
-
-
Constructor Summary
Constructors Constructor Description MetadataExtension()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringgetExtensionName()Collection<String>getExtraMetadataFieldNames(T output)abstract Map<String,Object>getExtras(T output, IoParameters parameters)Gets the extra metadata as simplekey=valuemapping.protected booleanhasExtrasToReturn(T output, IoParameters parameters)protected Map<String,Object>wrapSingleIntoMap(Object metadata)
-
-
-
Method Detail
-
getExtensionName
public abstract String getExtensionName()
-
getExtras
public abstract Map<String,Object> getExtras(T output, IoParameters parameters)
Gets the extra metadata as simple
key=valuemapping. The value is of kind object, so the implementation is free to put any data structure which might make sense to serialize.Implementation is responsible to respect selected fields from the query which can be obtained by
IoParameters.getFields().- Parameters:
output- the actual parameter output to get extra metadata for.parameters- I/O parameters to fine grain extra metadata assembly.- Returns:
- the extra metadata.
-
getExtraMetadataFieldNames
public Collection<String> getExtraMetadataFieldNames(T output)
-
hasExtrasToReturn
protected boolean hasExtrasToReturn(T output, IoParameters parameters)
-
-