public abstract class AbstractMoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata> extends AbstractJsonConvertibleRecord implements MoleculeArchiveProperties<M,I>
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.Integer> |
channelSet |
protected java.util.Map<java.lang.String,MarsDocument> |
documents |
protected java.lang.String |
inputSchema |
protected java.util.Set<java.lang.String> |
moleculeDataTableColumnSet |
protected java.util.Set<java.util.List<java.lang.String>> |
moleculeSegmentTableNames |
protected java.util.concurrent.atomic.AtomicInteger |
numberOfMolecules |
protected java.util.concurrent.atomic.AtomicInteger |
numMetadata |
protected java.util.Set<java.lang.String> |
parameterSet |
protected MoleculeArchive<? extends Molecule,? extends MarsMetadata,? extends MoleculeArchiveProperties<?,?>,? extends MoleculeArchiveIndex<?,?>> |
parent |
protected java.util.Set<java.lang.String> |
positionSet |
protected java.util.Set<java.lang.String> |
regionSet |
static java.lang.String |
SCHEMA |
protected java.util.Set<java.lang.String> |
tagSet |
Constructor and Description |
---|
AbstractMoleculeArchiveProperties()
Creates an empty MoleculeArchiveProperties record.
|
AbstractMoleculeArchiveProperties(com.fasterxml.jackson.core.JsonParser jParser)
Constructor for loading MoleculeArchiveProperties record from a JsonParser
stream.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllChannels(java.util.Set<java.lang.Integer> channels)
Add molecule channel indexes to the global set that contains a record of
all unique channel indexes that are represented in the archive.
|
void |
addAllColumns(java.util.List<java.lang.String> columns)
Add column names to the unique set of column names in use in molecule
DataTables.
|
void |
addAllColumns(java.util.Set<java.lang.String> columns)
Add column names to the unique set of column names in use in molecule
DataTables.
|
void |
addAllParameters(java.util.Set<java.lang.String> parameters)
Add molecule parameter names to the global set that contains a record of
all unique parameter names that are being used.
|
void |
addAllPositions(java.util.Set<java.lang.String> positions)
Add molecule position names to the global set that contains a record of all
unique position names that are being used.
|
void |
addAllRegions(java.util.Set<java.lang.String> regions)
Add molecule region names to the global set that contains a record of all
unique region names that are being used.
|
void |
addAllSegmentsTableNames(java.util.Set<java.util.List<java.lang.String>> segmentTableNames)
Add segment table names to the unique set of segment table names found in
molecule records.
|
void |
addAllTags(java.util.Set<java.lang.String> tags)
Add molecule tags to the global set that contains a record of all unique
tag names that are being used.
|
void |
addChannel(int channel)
Add a channel index to the global set that contains a record of all unique
indexes that are represented in the archive.
|
void |
addColumn(java.lang.String column)
Add a column name to the unique set of column names in use in molecule
DataTables.
|
void |
addComment(java.lang.String comment)
Add to archive comments.
|
void |
addMetadataProperties(I metadata)
Update global sets to include metadata properties.
|
void |
addMoleculeProperties(M molecule)
Update global sets to include molecule properties.
|
void |
addParameter(java.lang.String parameterName)
Add a molecule parameter name to the global set that contains a record of
all unique parameter names that are being used.
|
void |
addPosition(java.lang.String position)
Add a molecule position name to the global set that contains a record of
all unique position names that are being used.
|
void |
addRegion(java.lang.String region)
Add a molecule region name to the global set that contains a record of all
unique region names that are being used.
|
void |
addSegmentsTableNames(java.util.List<java.lang.String> segmentTableName)
Add a segment table name to the unique set of segment table names found in
molecule records.
|
void |
addTag(java.lang.String tag)
Add a molecule tag to the global set that contains a record of all unique
tag names that are being used.
|
void |
clear()
Clear contents of all global sets and records counts.
|
protected void |
createIOMaps()
Must be implemented in subclasses to define how fields, objects, arrays
should be saved based on the Jackson streaming API.
|
java.util.Set<java.lang.Integer> |
getChannelSet()
Get the set of channel indexes for molecules in the archive.
|
java.util.Set<java.lang.String> |
getColumnSet()
Get the unique set of column names in use in molecule DataTables.
|
java.lang.String |
getComments()
Get archive comments.
|
MarsDocument |
getDocument(java.lang.String name)
Retrieve document.
|
java.util.Set<java.lang.String> |
getDocumentNames()
Get the names of all documents.
|
java.lang.String |
getInputSchema()
Get the Json input schema for the archive.
|
int |
getNumberOfMetadatas()
Get the number of MarsMetadata records in the archive.
|
int |
getNumberOfMolecules()
Get the number of molecule in the archive.
|
java.util.Set<java.lang.String> |
getParameterSet()
Get the set of molecule parameter names in use.
|
java.util.Set<java.lang.String> |
getPositionSet()
Get the set of molecule position names in use.
|
java.util.Set<java.lang.String> |
getRegionSet()
Get the set of molecule region names in use.
|
java.util.Set<java.util.List<java.lang.String>> |
getSegmentsTableNames()
Get the unique set of segment table names found in molecule records.
|
java.util.Set<java.lang.String> |
getTagSet()
Get the set of molecule tag names in use.
|
void |
merge(MoleculeArchiveProperties<?,?> properties,
java.lang.String archiveName)
Used to during merge MoleculeArchive merge events to merge the properties
of another archive into this one.
|
void |
putDocument(MarsDocument document)
Add additional comments or reports as documents.
|
void |
putDocument(java.lang.String name,
java.lang.String content)
Add additional comments or reports as documents.
|
void |
removeAllDocuments()
Remove all documents.
|
void |
removeDocument(java.lang.String name)
Remove document.
|
void |
setChannelSet(java.util.Set<java.lang.Integer> channelSet)
Redefine the set of molecule channels in use.
|
void |
setColumnSet(java.util.Set<java.lang.String> moleculeDataTableColumnSet)
Redefine the unique set of column names in use in molecule DataTables.
|
void |
setComments(java.lang.String comments)
Overwrite archive comments with new set of comments.
|
void |
setNumberOfMetadatas(int numMetadata)
Set the number of MarsMetadata records in the archive.
|
void |
setNumberOfMolecules(int numMolecules)
Set the number of molecule in the archive.
|
void |
setParameterSet(java.util.Set<java.lang.String> parameterSet)
Redefine the set of parameter names in use.
|
void |
setParent(MoleculeArchive<? extends Molecule,? extends MarsMetadata,? extends MoleculeArchiveProperties<?,?>,? extends MoleculeArchiveIndex<?,?>> archive)
Set the parent MoleculeArchive that these MoleculeArchiveProperties belong
to.
|
void |
setPositionSet(java.util.Set<java.lang.String> positionSet)
Redefine the set of molecule position names in use.
|
void |
setRegionSet(java.util.Set<java.lang.String> regionSet)
Redefine the set of molecule region names in use.
|
void |
setSegmentsTableNames(java.util.Set<java.util.List<java.lang.String>> moleculeSegmentTableNames)
Redefine the unique set of segment table names found in molecule records.
|
void |
setTagSet(java.util.Set<java.lang.String> tagSet)
Redefine the set of molecule tags in use.
|
dumpJSON, fromJSON, getJsonGenerator, getJsonParser, setJsonField, setShowWarnings, toJSON
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dumpJSON, fromJSON, getJsonGenerator, getJsonParser, setJsonField, setShowWarnings, toJSON
protected java.util.concurrent.atomic.AtomicInteger numberOfMolecules
protected java.util.concurrent.atomic.AtomicInteger numMetadata
protected java.lang.String inputSchema
protected final java.util.Map<java.lang.String,MarsDocument> documents
public static final java.lang.String SCHEMA
protected java.util.Set<java.lang.String> tagSet
protected java.util.Set<java.lang.String> positionSet
protected java.util.Set<java.lang.String> regionSet
protected java.util.Set<java.lang.String> parameterSet
protected java.util.Set<java.lang.String> moleculeDataTableColumnSet
protected java.util.Set<java.lang.Integer> channelSet
protected java.util.Set<java.util.List<java.lang.String>> moleculeSegmentTableNames
protected MoleculeArchive<? extends Molecule,? extends MarsMetadata,? extends MoleculeArchiveProperties<?,?>,? extends MoleculeArchiveIndex<?,?>> parent
public AbstractMoleculeArchiveProperties()
public AbstractMoleculeArchiveProperties(com.fasterxml.jackson.core.JsonParser jParser) throws java.io.IOException
jParser
- A JsonParser at the start of the MoleculeArchiveProperties
record.java.io.IOException
- Thrown if unable to parse Json from the JsonParser
stream.protected void createIOMaps()
AbstractJsonConvertibleRecord
createIOMaps
in class AbstractJsonConvertibleRecord
public java.lang.String getInputSchema()
getInputSchema
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void merge(MoleculeArchiveProperties<?,?> properties, java.lang.String archiveName)
merge
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
properties
- MoleculeArchiveProperties record to merge into this one.archiveName
- Name of the archive that is being merged with this one.public void addTag(java.lang.String tag)
addTag
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
tag
- The tag to add.public void addAllTags(java.util.Set<java.lang.String> tags)
addAllTags
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
tags
- Set of tags to add.public java.util.Set<java.lang.String> getTagSet()
getTagSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void setTagSet(java.util.Set<java.lang.String> tagSet)
setTagSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
tagSet
- The tag set.public void addChannel(int channel)
addChannel
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
channel
- The channel for this molecule.public void addAllChannels(java.util.Set<java.lang.Integer> channels)
addAllChannels
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
channels
- The channels to add.public java.util.Set<java.lang.Integer> getChannelSet()
getChannelSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void setChannelSet(java.util.Set<java.lang.Integer> channelSet)
setChannelSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
channelSet
- The set of channels.public void addParameter(java.lang.String parameterName)
addParameter
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
parameterName
- The parameter name to add.public void addAllParameters(java.util.Set<java.lang.String> parameters)
addAllParameters
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
parameters
- The parameters to add.public java.util.Set<java.lang.String> getParameterSet()
getParameterSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void setParameterSet(java.util.Set<java.lang.String> parameterSet)
setParameterSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
parameterSet
- The set of parameters.public void addPosition(java.lang.String position)
addPosition
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
position
- The position name to add.public void addAllPositions(java.util.Set<java.lang.String> positions)
addAllPositions
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
positions
- The position names to add.public java.util.Set<java.lang.String> getPositionSet()
getPositionSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void setPositionSet(java.util.Set<java.lang.String> positionSet)
setPositionSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
positionSet
- The position set.public void addRegion(java.lang.String region)
addRegion
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
region
- The region name to add.public void addAllRegions(java.util.Set<java.lang.String> regions)
addAllRegions
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
regions
- The region names to add.public java.util.Set<java.lang.String> getRegionSet()
getRegionSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void setRegionSet(java.util.Set<java.lang.String> regionSet)
setRegionSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
regionSet
- The region set.public void setNumberOfMolecules(int numMolecules)
setNumberOfMolecules
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
numMolecules
- Total molecule count.public int getNumberOfMolecules()
getNumberOfMolecules
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void setNumberOfMetadatas(int numMetadata)
setNumberOfMetadatas
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
numMetadata
- Total metadata count.public int getNumberOfMetadatas()
getNumberOfMetadatas
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void addColumn(java.lang.String column)
addColumn
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
column
- The column name to add.public void addAllColumns(java.util.Set<java.lang.String> columns)
addAllColumns
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
columns
- The set column names to add.public void addAllColumns(java.util.List<java.lang.String> columns)
addAllColumns
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
columns
- The list of column names to add.public void setColumnSet(java.util.Set<java.lang.String> moleculeDataTableColumnSet)
setColumnSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
moleculeDataTableColumnSet
- The set of molecule table columns names.public java.util.Set<java.lang.String> getColumnSet()
getColumnSet
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void addSegmentsTableNames(java.util.List<java.lang.String> segmentTableName)
addSegmentsTableNames
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
segmentTableName
- The segment table names.public void addAllSegmentsTableNames(java.util.Set<java.util.List<java.lang.String>> segmentTableNames)
addAllSegmentsTableNames
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
segmentTableNames
- The segment Table names.public void setSegmentsTableNames(java.util.Set<java.util.List<java.lang.String>> moleculeSegmentTableNames)
setSegmentsTableNames
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
moleculeSegmentTableNames
- The molecule segment table names.public java.util.Set<java.util.List<java.lang.String>> getSegmentsTableNames()
getSegmentsTableNames
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public java.lang.String getComments()
getComments
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void addComment(java.lang.String comment)
addComment
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
comment
- The comment to add.public void setComments(java.lang.String comments)
setComments
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
comments
- The comments to set.public void putDocument(java.lang.String name, java.lang.String content)
MoleculeArchiveProperties
putDocument
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
name
- Document name.content
- Document content.public void putDocument(MarsDocument document)
MoleculeArchiveProperties
putDocument
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
document
- Document.public MarsDocument getDocument(java.lang.String name)
MoleculeArchiveProperties
getDocument
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
name
- Document name.public void removeDocument(java.lang.String name)
MoleculeArchiveProperties
removeDocument
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
name
- Document name.public void removeAllDocuments()
MoleculeArchiveProperties
removeAllDocuments
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public java.util.Set<java.lang.String> getDocumentNames()
MoleculeArchiveProperties
getDocumentNames
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void clear()
MoleculeArchiveProperties
clear
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
public void addMoleculeProperties(M molecule)
MoleculeArchiveProperties
addMoleculeProperties
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
molecule
- The Molecule
to add the properties from.public void addMetadataProperties(I metadata)
MoleculeArchiveProperties
addMetadataProperties
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
metadata
- The MarsMetadata
to add the properties from.public void setParent(MoleculeArchive<? extends Molecule,? extends MarsMetadata,? extends MoleculeArchiveProperties<?,?>,? extends MoleculeArchiveIndex<?,?>> archive)
setParent
in interface MoleculeArchiveProperties<M extends Molecule,I extends MarsMetadata>
archive
- The MoleculeArchive
holding this record.