public abstract class LazyDatasetBase extends Object implements ILazyDataset, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
catchExceptions |
protected static org.slf4j.Logger |
logger |
protected ConcurrentMap<Class<? extends MetadataType>,List<MetadataType>> |
metadata |
protected String |
name |
protected int[] |
shape
The shape or dimensions of the dataset
|
| Constructor and Description |
|---|
LazyDatasetBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMetadata(MetadataType metadata)
Add metadata to the dataset
|
static int[] |
checkPermutatedAxes(int[] shape,
int... axes)
Check permutation axes
|
void |
clearMetadata(Class<? extends MetadataType> clazz)
Remove metadata of given class
|
LazyDatasetBase |
clone()
Clone dataset
|
protected ConcurrentMap<Class<? extends MetadataType>,List<MetadataType>> |
copyMetadata() |
protected static ConcurrentMap<Class<? extends MetadataType>,List<MetadataType>> |
copyMetadata(Map<Class<? extends MetadataType>,List<MetadataType>> metadata) |
protected ILazyDataset |
createFromSerializable(Serializable blob,
boolean keepLazy) |
protected void |
dirtyMetadata()
Dirty metadata that are annotated by @Dirtiable.
|
boolean |
equals(Object obj) |
static Class<? extends MetadataType> |
findMetadataTypeSubInterfaces(Class<? extends MetadataType> clazz)
Find first sub-interface of (or class that directly implements) MetadataType
|
abstract int |
getDType() |
Class<?> |
getElementClass() |
protected ErrorMetadata |
getErrorMetadata() |
ILazyDataset |
getErrors()
Get the errors, if any.
|
<S extends MetadataType,T extends S> |
getFirstMetadata(Class<T> clazz) |
IMetadata |
getMetadata()
Deprecated.
|
<S extends MetadataType,T extends S> |
getMetadata(Class<T> clazz) |
protected static ConcurrentMap<Class<? extends MetadataType>,List<MetadataType>> |
getMetadataMap(ILazyDataset a,
boolean clone) |
String |
getName() |
int |
getRank()
The rank (or number of dimensions/indices) of the dataset can be zero for a zero-rank
(single-valued) dataset
|
int[] |
getShape()
The shape (or array of lengths for each dimension) of the dataset can be empty for zero-rank
datasets
|
boolean |
hasErrors()
If error information is set, returns true.
|
int |
hashCode() |
protected void |
reshapeMetadata(int[] oldShape,
int[] newShape)
Reshape all datasets in metadata that are annotated by @Reshapeable.
|
protected void |
restoreMetadata(Map<Class<? extends MetadataType>,List<MetadataType>> oldMetadata) |
void |
setDirty()
This method allows anything that dirties the dataset to clear various metadata values
so that the other methods can work correctly.
|
void |
setErrors(Serializable errors)
Set the errors.
|
void |
setMetadata(MetadataType metadata)
Set metadata on the dataset
|
void |
setName(String name) |
protected void |
sliceMetadata(boolean asView,
SliceND slice)
Slice all datasets in metadata that are annotated by @Sliceable.
|
protected void |
transposeMetadata(int[] axesMap)
Transpose all datasets in metadata that are annotated by @Transposable.
|
finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetElementsPerItem, getSize, getSlice, getSlice, getSlice, getSlice, getSlice, getSlice, getSliceView, getSliceView, getSliceView, getTransposedView, setShape, squeezeEndsprotected static final org.slf4j.Logger logger
protected static boolean catchExceptions
protected int[] shape
protected ConcurrentMap<Class<? extends MetadataType>,List<MetadataType>> metadata
public LazyDatasetBase()
public abstract int getDType()
public Class<?> getElementClass()
getElementClass in interface ILazyDatasetpublic LazyDatasetBase clone()
ILazyDatasetclone in interface ILazyDatasetclone in class Objectpublic int[] getShape()
ILazyDatasetgetShape in interface ILazyDatasetpublic int getRank()
ILazyDatasetgetRank in interface ILazyDatasetpublic void setDirty()
public static Class<? extends MetadataType> findMetadataTypeSubInterfaces(Class<? extends MetadataType> clazz)
clazz - IllegalArgumentException - when given class is MetadataType or an anonymous sub-class of itpublic void setMetadata(MetadataType metadata)
ILazyDatasetsetMetadata in interface ILazyDatasetmetadata - (null is ignored so use clear(null) instead)public void addMetadata(MetadataType metadata)
ILazyDatasetaddMetadata in interface ILazyDataset@Deprecated public IMetadata getMetadata()
getMetadata in interface IMetadataProviderpublic <S extends MetadataType,T extends S> List<S> getMetadata(Class<T> clazz) throws MetadataException
getMetadata in interface IMetadataProviderclazz - if null return everythingMetadataExceptionpublic <S extends MetadataType,T extends S> S getFirstMetadata(Class<T> clazz)
getFirstMetadata in interface IMetadataProviderclazz - if null return first from everythingpublic void clearMetadata(Class<? extends MetadataType> clazz)
ILazyDatasetclearMetadata in interface ILazyDatasetclazz - if null remove everythingprotected ConcurrentMap<Class<? extends MetadataType>,List<MetadataType>> copyMetadata()
protected static ConcurrentMap<Class<? extends MetadataType>,List<MetadataType>> copyMetadata(Map<Class<? extends MetadataType>,List<MetadataType>> metadata)
protected void restoreMetadata(Map<Class<? extends MetadataType>,List<MetadataType>> oldMetadata)
protected static ConcurrentMap<Class<? extends MetadataType>,List<MetadataType>> getMetadataMap(ILazyDataset a, boolean clone)
protected void sliceMetadata(boolean asView, SliceND slice)
asView - if true then just a viewslice - protected void reshapeMetadata(int[] oldShape, int[] newShape)
newShape - protected void transposeMetadata(int[] axesMap)
axesMap - protected void dirtyMetadata()
protected ILazyDataset createFromSerializable(Serializable blob, boolean keepLazy)
public void setErrors(Serializable errors)
ILazyDatasetsetErrors in interface ILazyDataseterrors - - may be null to remove the error setprotected ErrorMetadata getErrorMetadata()
public ILazyDataset getErrors()
ILazyDatasetgetErrors in interface ILazyDatasetpublic boolean hasErrors()
ILazyDatasethasErrors in interface ILazyDatasetpublic static int[] checkPermutatedAxes(int[] shape, int... axes)
shape - axes - Copyright © 2014–2019 Eclipse Foundation. All rights reserved.