public class CompositionOutput extends PropertiesOutput
Usage: <-all|-dataset|-list|-dynamic> [<options...>]
-all: Print out fractions of all elements, no options
-dataset: Print out all elements that are present in a certain
dataset, which is provided as the only option
-list: Print out only elements in a certain list, which is provided
as options to the command
-dynamic: Print out only elements in the in the dataset being
print, no options
Modifier and Type | Class and Description |
---|---|
static class |
CompositionOutput.ElementSelectionMethod
How to determine which elements to print
|
Modifier and Type | Field and Description |
---|---|
protected java.util.SortedSet<java.lang.Integer> |
ElementsToPrint
User-defined set of elements to print
|
protected CompositionOutput.ElementSelectionMethod |
SelectionMethod
Method used to determine which elements to select
|
Constructor and Description |
---|
CompositionOutput() |
Modifier and Type | Method and Description |
---|---|
void |
addAllElementsInDataset(CompositionDataset data)
Add all elements present in a dataset to the list of elements being printed.
|
void |
addElement(int id)
Add element to the list of elements being printed.
|
void |
addElement(java.lang.String elem)
Add element to the list of elements being printed
|
void |
addElements(java.util.Collection<java.lang.Integer> ids)
Add several elements to the list of elements being printed.
|
void |
addElementsByName(java.util.Collection<java.lang.String> elems)
Add several elements to the list of elements being printed.
|
void |
clearSelectedElementList()
Clear the list of user-specific elements
|
protected void |
printAttributeNames(Dataset data,
java.io.PrintWriter fp)
Print out attribute names
|
protected void |
printEntryAttributes(MultiPropertyEntry entryPtr,
java.io.PrintWriter fp)
Print out attributes of an entry
|
void |
printHeader(Dataset dataPtr,
java.io.OutputStream output)
Write header to output.
|
java.lang.String |
printUsage()
Print out required format for options.
|
void |
setOptions(java.util.List<java.lang.Object> Options)
Set any options for this object.
|
void |
setSelectionMethod(CompositionOutput.ElementSelectionMethod method)
Set the method used to determine which elements to print.
|
printEnd, printEntries, printEntryProperties
writeDataset, writeDataset, writeDataset
protected CompositionOutput.ElementSelectionMethod SelectionMethod
protected java.util.SortedSet<java.lang.Integer> ElementsToPrint
public void setOptions(java.util.List<java.lang.Object> Options) throws java.lang.Exception
Options
setOptions
in interface Options
setOptions
in class PropertiesOutput
Options
- Array of options as Objects - can be null
java.lang.Exception
- if problem with inputspublic java.lang.String printUsage()
Options
printUsage
in interface Options
printUsage
in class PropertiesOutput
public void setSelectionMethod(CompositionOutput.ElementSelectionMethod method)
method
- Desired methodpublic void clearSelectedElementList()
public void addElement(int id)
id
- ID number of element (Z - 1)public void addElements(java.util.Collection<java.lang.Integer> ids)
ids
- Collection of element ID #s (Z-1)public void addElement(java.lang.String elem)
elem
- Abbreviation of element (e.g., Fe)public void addElementsByName(java.util.Collection<java.lang.String> elems)
elems
- List of element abbreviations (e.g., Fe)public void addAllElementsInDataset(CompositionDataset data)
data
- Dataset containing elements to be printedpublic void printHeader(Dataset dataPtr, java.io.OutputStream output)
BaseDatasetOutput
printHeader
in class PropertiesOutput
dataPtr
- Dataset to be writtenoutput
- Output streamprotected void printAttributeNames(Dataset data, java.io.PrintWriter fp)
PropertiesOutput
printAttributeNames
in class PropertiesOutput
data
- Dataset being printedfp
- Output streamprotected void printEntryAttributes(MultiPropertyEntry entryPtr, java.io.PrintWriter fp)
PropertiesOutput
printEntryAttributes
in class PropertiesOutput
entryPtr
- Entry to be printedfp
- Output stream