public class Metadata extends Object implements IMetadata
| Constructor and Description |
|---|
Metadata() |
Metadata(Map<String,? extends Serializable> metadata) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDataInfo(String name,
int... shape)
Add name and shape of a dataset to metadata
|
void |
addNames(Collection<String> names) |
IMetadata |
clone()
Copy of metadata
|
Collection<String> |
getDataNames()
Returns a collection of dataset names or null if not implemented
|
Map<String,int[]> |
getDataShapes()
Can be implemented to return shapes of dataset
(shape can be null if it is not known)
|
Map<String,Integer> |
getDataSizes()
Can be implemented to return sizes of datasets
(size can be null if it is not known)
|
String |
getFilePath() |
protected Map<String,? extends Serializable> |
getInternalMetadata()
Internal use only
|
Collection<String> |
getMetaNames()
Returns a collection of metadata names
|
Serializable |
getMetaValue(String key)
Returns string value or null if not implemented
|
Collection<Serializable> |
getUserObjects()
May be implemented to provide custom metadata in the form of a collection of serializable objects
|
void |
initialize(Map<String,? extends Serializable> metadata)
Initialize metadata
|
void |
setFilePath(String filePath) |
void |
setMetadata(Map<String,? extends Serializable> metadata)
Set metadata map
|
void |
setUserObjects(Collection<Serializable> objects)
Set user objects
|
public Metadata()
public Metadata(Map<String,? extends Serializable> metadata)
public void initialize(Map<String,? extends Serializable> metadata)
IMetadatainitialize in interface IMetadatapublic void addNames(Collection<String> names)
public void setMetadata(Map<String,? extends Serializable> metadata)
setMetadata in interface IMetadatametadata - protected Map<String,? extends Serializable> getInternalMetadata()
public void setUserObjects(Collection<Serializable> objects)
objects - public void addDataInfo(String name, int... shape)
IMetadataaddDataInfo in interface IMetadatashape - (can be null or zero-length)
(NOTE method should be public, people can define loaders outside this
package like the DESY FIO loader for instance.)public Collection<String> getDataNames()
IMetadatagetDataNames in interface IMetadatapublic Map<String,int[]> getDataShapes()
IMetadatagetDataShapes in interface IMetadatapublic Map<String,Integer> getDataSizes()
IMetadatagetDataSizes in interface IMetadatapublic Serializable getMetaValue(String key) throws MetadataException
IMetadatagetMetaValue in interface IMetadataMetadataExceptionpublic Collection<String> getMetaNames() throws MetadataException
IMetadatagetMetaNames in interface IMetadataMetadataExceptionpublic Collection<Serializable> getUserObjects()
IMetadatagetUserObjects in interface IMetadatapublic IMetadata clone()
IMetadataclone in interface IDataAnalysisObjectclone in interface IMetadataclone in interface MetadataTypeclone in class Objectpublic String getFilePath()
getFilePath in interface IMetadatapublic void setFilePath(String filePath)
setFilePath in interface IMetadataCopyright © 2014–2018 Eclipse Foundation. All rights reserved.