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)
IMetadata
initialize
in interface IMetadata
public void addNames(Collection<String> names)
public void setMetadata(Map<String,? extends Serializable> metadata)
setMetadata
in interface IMetadata
metadata
- protected Map<String,? extends Serializable> getInternalMetadata()
public void setUserObjects(Collection<Serializable> objects)
objects
- public void addDataInfo(String name, int... shape)
IMetadata
addDataInfo
in interface IMetadata
shape
- (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()
IMetadata
getDataNames
in interface IMetadata
public Map<String,int[]> getDataShapes()
IMetadata
getDataShapes
in interface IMetadata
public Map<String,Integer> getDataSizes()
IMetadata
getDataSizes
in interface IMetadata
public Serializable getMetaValue(String key) throws MetadataException
IMetadata
getMetaValue
in interface IMetadata
MetadataException
public Collection<String> getMetaNames() throws MetadataException
IMetadata
getMetaNames
in interface IMetadata
MetadataException
public Collection<Serializable> getUserObjects()
IMetadata
getUserObjects
in interface IMetadata
public IMetadata clone()
IMetadata
clone
in interface IDataAnalysisObject
clone
in interface IMetadata
clone
in interface MetadataType
clone
in class Object
public String getFilePath()
getFilePath
in interface IMetadata
public void setFilePath(String filePath)
setFilePath
in interface IMetadata
Copyright © 2017. All rights reserved.