jasext.flatfileserver
Class FlatFileEventSource
- java.lang.Object
-
- jasext.flatfileserver.FlatFileEventSource
-
- All Implemented Interfaces:
- hepjas.analysis.EventSource, AnnotatedEventSource, TreeObjectSource
public class FlatFileEventSource extends java.lang.Object implements AnnotatedEventSource
-
-
Field Summary
Fields Modifier and Type Field and Description static intNO_STRING_DELIMITERstatic intWHITESPACE_DELIMITED
-
Constructor Summary
Constructors Constructor and Description FlatFileEventSource()FlatFileEventSource(java.lang.String s)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidafterLastEvent()Called after the last event is accessed.voidbeforeFirstEvent()Called before the first event is accessed.voidclose()Provide some cleanup code if it is relevant to close the event source.java.lang.StringgetDateFormat()java.lang.StringgetDateTimeFormat()intgetDelim()java.lang.ClassgetEventDataClass()Specify class of objects to be returned by getNextEventjava.lang.StringgetFileName()booleangetFirstLineHasTitle()booleangetGZIP()booleangetHasHeaders()java.lang.ObjectgetItem(TreeItem i)Return the histogram or event source that corresponds to the given tree item.TreeItem[]getItems()Return the items to be displayed on the tree.java.lang.StringgetName()Return a name for your event source.hepjas.analysis.EventDatagetNextEvent()Return the next event.intgetQuoteChar()java.lang.StringgetTimeFormat()intgetTotalNumberOfEvents()Return the number of events, or -1 if unknown.voidinit()voidsetDateFormat(java.lang.String s)voidsetDateTimeFormat(java.lang.String s)voidsetDelim(int c)voidsetFileName(java.lang.String s)voidsetFirstLineHasTitle(boolean b)voidsetGZIP(boolean b)voidsetHasHeaders(boolean b)voidsetQuoteChar(int c)voidsetTimeFormat(java.lang.String s)
-
-
-
Field Detail
-
NO_STRING_DELIMITER
public static final int NO_STRING_DELIMITER
- See Also:
- Constant Field Values
-
WHITESPACE_DELIMITED
public static final int WHITESPACE_DELIMITED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FlatFileEventSource
public FlatFileEventSource(java.lang.String s) throws jasext.flatfileserver.FlatFileException- Throws:
jasext.flatfileserver.FlatFileException
-
FlatFileEventSource
public FlatFileEventSource()
-
-
Method Detail
-
getEventDataClass
public java.lang.Class getEventDataClass()
Description copied from interface:hepjas.analysis.EventSourceSpecify class of objects to be returned by getNextEvent- Specified by:
getEventDataClassin interfacehepjas.analysis.EventSource
-
close
public void close()
Description copied from interface:hepjas.analysis.EventSourceProvide some cleanup code if it is relevant to close the event source.- Specified by:
closein interfacehepjas.analysis.EventSource
-
init
public void init() throws jasext.flatfileserver.FlatFileException- Throws:
jasext.flatfileserver.FlatFileException
-
getDateTimeFormat
public java.lang.String getDateTimeFormat()
-
setDateTimeFormat
public void setDateTimeFormat(java.lang.String s)
-
getTimeFormat
public java.lang.String getTimeFormat()
-
setTimeFormat
public void setTimeFormat(java.lang.String s)
-
getDateFormat
public java.lang.String getDateFormat()
-
setDateFormat
public void setDateFormat(java.lang.String s)
-
getDelim
public int getDelim()
-
setDelim
public void setDelim(int c)
-
getQuoteChar
public int getQuoteChar()
-
setQuoteChar
public void setQuoteChar(int c)
-
getFileName
public java.lang.String getFileName()
-
setFileName
public void setFileName(java.lang.String s)
-
getHasHeaders
public boolean getHasHeaders()
-
setHasHeaders
public void setHasHeaders(boolean b)
-
getFirstLineHasTitle
public boolean getFirstLineHasTitle()
-
setFirstLineHasTitle
public void setFirstLineHasTitle(boolean b)
-
getGZIP
public boolean getGZIP()
-
setGZIP
public void setGZIP(boolean b)
-
getItems
public TreeItem[] getItems()
Description copied from interface:AnnotatedEventSourceReturn the items to be displayed on the tree. Normally, have one for each field in the data set.- Specified by:
getItemsin interfaceAnnotatedEventSource
-
getItem
public java.lang.Object getItem(TreeItem i)
Description copied from interface:AnnotatedEventSourceReturn the histogram or event source that corresponds to the given tree item.- Specified by:
getItemin interfaceAnnotatedEventSource- Specified by:
getItemin interfaceTreeObjectSource
-
getTotalNumberOfEvents
public int getTotalNumberOfEvents()
Description copied from interface:hepjas.analysis.EventSourceReturn the number of events, or -1 if unknown.- Specified by:
getTotalNumberOfEventsin interfacehepjas.analysis.EventSource
-
beforeFirstEvent
public void beforeFirstEvent()
Description copied from interface:hepjas.analysis.EventSourceCalled before the first event is accessed.- Specified by:
beforeFirstEventin interfacehepjas.analysis.EventSource
-
afterLastEvent
public void afterLastEvent()
Description copied from interface:hepjas.analysis.EventSourceCalled after the last event is accessed.- Specified by:
afterLastEventin interfacehepjas.analysis.EventSource
-
getNextEvent
public hepjas.analysis.EventData getNextEvent() throws hepjas.analysis.EndOfDataExceptionDescription copied from interface:hepjas.analysis.EventSourceReturn the next event.- Specified by:
getNextEventin interfacehepjas.analysis.EventSource- Throws:
hepjas.analysis.EndOfDataException- when no more events are available
-
getName
public java.lang.String getName()
Description copied from interface:hepjas.analysis.EventSourceReturn a name for your event source.- Specified by:
getNamein interfacehepjas.analysis.EventSource
-
-
DataMelt 3.0 © DataMelt by jWork.ORG