Class GenericLoadParseQueryXML<AS extends mpicbg.spim.data.generic.AbstractSpimData<S>,S extends mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<V,D,L>,V extends mpicbg.spim.data.generic.sequence.BasicViewSetup,D extends mpicbg.spim.data.generic.sequence.BasicViewDescription<V>,L extends mpicbg.spim.data.generic.sequence.BasicImgLoader,X extends mpicbg.spim.data.generic.XmlIoAbstractSpimData<S,AS>>
java.lang.Object
net.preibisch.mvrecon.fiji.plugin.queryXML.GenericLoadParseQueryXML<AS,S,V,D,L,X>
- Direct Known Subclasses:
LoadParseQueryXML
public abstract class GenericLoadParseQueryXML<AS extends mpicbg.spim.data.generic.AbstractSpimData<S>,S extends mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<V,D,L>,V extends mpicbg.spim.data.generic.sequence.BasicViewSetup,D extends mpicbg.spim.data.generic.sequence.BasicViewDescription<V>,L extends mpicbg.spim.data.generic.sequence.BasicImgLoader,X extends mpicbg.spim.data.generic.XmlIoAbstractSpimData<S,AS>>
extends Object
Interface for interactive parsing of spimdata XMLs
- Author:
- Stephan Preibisch (stephan.preibisch@gmx.de)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashMap<String, List<mpicbg.spim.data.generic.base.Entity>> protected static String[]protected HashMap<String, List<mpicbg.spim.data.generic.base.Entity>> protected booleanprotected Stringprotected Colorprotected Comparator<String> protected ASstatic Stringprotected static Stringprotected ij.gui.GenericDialogprotected static Stringprotected Xprotected ArrayList<ActionListener> protected Stringprotected Stringprotected static Stringprotected static Stringprotected static Stringprotected ArrayList<mpicbg.spim.data.sequence.TimePoint> protected static Stringprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddButton(String buttonText, ActionListener listener) voidaddCheckbox(String checkBoxText) Add a checkbox to the XML-loading dialog.protected voidaddListeners(ij.gui.GenericDialog gd, TextField tf, Label label1, Label label2) protected static String[]buildEntityList(String attributeName, List<? extends mpicbg.spim.data.generic.base.Entity> entityList, boolean addTitle) protected static String[]buildTimepointList(List<mpicbg.spim.data.sequence.TimePoint> tpList, boolean addTitle) static <AS extends mpicbg.spim.data.generic.AbstractSpimData<S>,S extends mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<V, D, L>, V extends mpicbg.spim.data.generic.sequence.BasicViewSetup, D extends mpicbg.spim.data.generic.sequence.BasicViewDescription<V>, L extends mpicbg.spim.data.generic.sequence.BasicImgLoader, X extends mpicbg.spim.data.generic.XmlIoAbstractSpimData<S, AS>>
ArrayList<String> getAttributes(AS data, Comparator<String> comparator) getData()getIO()static <AS extends mpicbg.spim.data.generic.AbstractSpimData<S>,S extends mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<V, D, L>, V extends mpicbg.spim.data.generic.sequence.BasicViewSetup, D extends mpicbg.spim.data.generic.sequence.BasicViewDescription<V>, L extends mpicbg.spim.data.generic.sequence.BasicImgLoader, X extends mpicbg.spim.data.generic.XmlIoAbstractSpimData<S, AS>>
StringgetSpimDataDescription(AS data, ArrayList<String> attributes, ArrayList<HashSet<Integer>> numEntitiesPerAttrib, int numAttributes) booleanResult of the checkbox added viaaddCheckbox(String);falseif none was added.protected static String[]makeChoiceList(String attribute) protected abstract ASprotected voidpopulateAttributesEntities(int numAttributes, ArrayList<HashSet<Integer>> numEntitiesPerAttrib) protected <E extends mpicbg.spim.data.generic.base.Entity>
booleanprotected booleanstatic intqueryIndividualEntry(String name, String[] list, int defaultSelection) Querys a single element from the liststatic boolean[]queryMultipleEntries(String name, String[] list, boolean[] defaultSelection) Querys a multiple element from the liststatic boolean[]queryPattern(String name, String[] list, String[] defaultSelectionArray) Querys a pattern of element from the listbooleanqueryXML()booleanbooleanbooleanbooleanvoidsetComparator(Comparator<String> comparator) protected booleantryParsing(URI xmlURI, boolean parseAllTypes)
-
Field Details
-
defaultXMLURI
-
goodMsg1
-
warningMsg1
-
errorMsg1
-
neutralMsg1a
-
neutralMsg1b
-
noMsg2
-
attributeChoiceList
-
defaultAttributeChoice
-
defaultAttributeEntityIndex
-
defaultAttributePatternString
-
defaultAttributeSelectedEntities
-
attributeChoice
-
io
-
comparator
-
message1
-
message2
-
color
-
data
-
xmlFileName
-
timepointsToProcess
-
attributes
-
allAttributeInstances
-
attributeInstancesToProcess
-
buttonText
-
listener
-
checkBoxText
-
checkBoxResult
protected boolean checkBoxResult -
gd
-
defineNewDataset
-
-
Constructor Details
-
GenericLoadParseQueryXML
-
-
Method Details
-
getIO
- Returns:
- the i/o object used to parse the XML
-
getData
- Returns:
- the SpimData object parsed from the xml
-
getXMLURI
- Returns:
- The location of the xml file
-
getXMLFileName
- Returns:
- ONLY the filename, without any path
-
getTimePointsToProcess
- Returns:
- All timepoints that should be processed
-
getViewSetupsToProcess
- Returns:
- All ViewSetups that should be processed per timepoint (based on the selected attributes)
-
setComparator
-
getComparator
-
queryXML
public boolean queryXML() -
queryXML
-
queryXML
-
queryXML
-
addButton
-
addCheckbox
Add a checkbox to the XML-loading dialog. Read the user's choice viaisCheckBoxSelected()afterqueryXML()returns. -
isCheckBoxSelected
public boolean isCheckBoxSelected()Result of the checkbox added viaaddCheckbox(String);falseif none was added. -
getGenericDialog
-
queryXML
-
queryIndividualEntry
Querys a single element from the list- Parameters:
name- - type of elements (e.g. "Timepoint")list- - list of available elementsdefaultSelection- - default selection- Returns:
- the selection or -1 if cancelled
-
queryMultipleEntries
public static boolean[] queryMultipleEntries(String name, String[] list, boolean[] defaultSelection) Querys a multiple element from the list- Parameters:
name- - type of elements (e.g. "Timepoints")list- - list of available elementsdefaultSelection- - default selection- Returns:
- the selection or null if cancelled
-
queryPattern
Querys a pattern of element from the list- Parameters:
name- - type of elements (e.g. "Timepoints")list- - list of available elementsdefaultSelectionArray- - default selection (array of size 1 to be able to return it)- Returns:
- the selection or null if cancelled
-
query
protected <E extends mpicbg.spim.data.generic.base.Entity> boolean query(int choice, String attribute, List<E> allEntities, List<E> entitiesToProcess) -
queryDetails
protected boolean queryDetails() -
buildTimepointList
protected static String[] buildTimepointList(List<mpicbg.spim.data.sequence.TimePoint> tpList, boolean addTitle) -
buildEntityList
protected static String[] buildEntityList(String attributeName, List<? extends mpicbg.spim.data.generic.base.Entity> entityList, boolean addTitle) -
makeChoiceList
-
tryParsing
-
populateAttributesEntities
-
entitiesPerAttribute
-
getAttributes
public static <AS extends mpicbg.spim.data.generic.AbstractSpimData<S>,S extends mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<V, ArrayList<String> getAttributesD, L>, V extends mpicbg.spim.data.generic.sequence.BasicViewSetup, D extends mpicbg.spim.data.generic.sequence.BasicViewDescription<V>, L extends mpicbg.spim.data.generic.sequence.BasicImgLoader, X extends mpicbg.spim.data.generic.XmlIoAbstractSpimData<S, AS>> (AS data, Comparator<String> comparator) -
getSpimDataDescription
public static <AS extends mpicbg.spim.data.generic.AbstractSpimData<S>,S extends mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<V, String getSpimDataDescriptionD, L>, V extends mpicbg.spim.data.generic.sequence.BasicViewSetup, D extends mpicbg.spim.data.generic.sequence.BasicViewDescription<V>, L extends mpicbg.spim.data.generic.sequence.BasicImgLoader, X extends mpicbg.spim.data.generic.XmlIoAbstractSpimData<S, AS>> (AS data, ArrayList<String> attributes, ArrayList<HashSet<Integer>> numEntitiesPerAttrib, int numAttributes) -
parseXML
-
addListeners
-