Package org.fairdatapipeline.api
Class Object_component_write
- java.lang.Object
-
- org.fairdatapipeline.api.Object_component
-
- org.fairdatapipeline.api.Object_component_write
-
public class Object_component_write extends Object_component
This represents an object_component to write to (or raise issues with) An object_component without a name is the 'whole_object' component. Ideally the user should only write to named components on toml and h5 files, and only write to the 'whole_object' on any other files. This is not enforced at the moment. You should only ever either write to the whole_object, OR to the named components, not both. This also is not enforced at the moment.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
populate_component()
void
writeDistribution(Distribution distribution)
write a Distribution, as this named component in the data product.void
writeEstimate(java.lang.Number estimateNumber)
write a Number as an Estimate, as this named component in the data product.CleanableFileChannel
writeFileChannel()
get the CleanableFileChannel to write directly to the file.java.nio.file.Path
writeLink()
get the filePath to write; only for whole_object componentvoid
writeSamples(Samples samples)
write Samples, as this named component in the data product.-
Methods inherited from class org.fairdatapipeline.api.Object_component
raise_issue
-
-
-
-
Method Detail
-
populate_component
protected void populate_component()
-
writeLink
public java.nio.file.Path writeLink()
get the filePath to write; only for whole_object component- Returns:
- Path the Path of the data object.
-
writeFileChannel
public CleanableFileChannel writeFileChannel() throws java.io.IOException
get the CleanableFileChannel to write directly to the file. only for whole_object component.- Returns:
- CleanableFileChannel the filechannel to write to.
- Throws:
java.io.IOException
- if the file can't be opened.
-
writeEstimate
public void writeEstimate(java.lang.Number estimateNumber)
write a Number as an Estimate, as this named component in the data product.- Parameters:
estimateNumber
- the number to write.
-
writeDistribution
public void writeDistribution(Distribution distribution)
write a Distribution, as this named component in the data product.- Parameters:
distribution
- the Distribution to write
-
writeSamples
public void writeSamples(Samples samples)
write Samples, as this named component in the data product.- Parameters:
samples
- a Samples object containing the samples
-
-