Package com.powsybl.psse.model.io
Class AbstractRecordGroup<T>
- java.lang.Object
-
- com.powsybl.psse.model.io.AbstractRecordGroup<T>
-
public abstract class AbstractRecordGroup<T> extends Object
- Author:
- Luma Zamarreño
, José Antonio Marqués
-
-
Field Summary
Fields Modifier and Type Field Description protected RecordGroupIdentification
identification
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractRecordGroup(RecordGroupIdentification identification, String... fieldNames)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
buildRecord(T object, String[] headers, String[] quoteFields, Context context)
List<String>
buildRecords(List<T> objects, String[] headers, String[] quoteFields, Context context)
String[]
fieldNames(PsseVersion version)
RecordGroupIdentification
getIdentification()
T
parseSingleRecord(String record, String[] headers, Context context)
protected abstract Class<T>
psseTypeClass()
String[]
quotedFields()
List<T>
read(BufferedReader reader, Context context)
List<T>
readFromStrings(List<String> records, Context context)
T
readHead(BufferedReader reader, Context context)
protected void
withFieldNames(PsseVersion.Major version, String... fieldNames)
protected void
withIO(FileFormat fileFormat, com.powsybl.psse.model.io.RecordGroupIO<T> rw)
protected void
withIO(FileFormat fileFormat, PsseVersion.Major version, com.powsybl.psse.model.io.RecordGroupIO<T> io)
protected void
withQuotedFields(String... quotedFields)
void
write(List<T> psseObjects, Context context, OutputStream outputStream)
void
writeHead(T psseObject, Context context, OutputStream outputStream)
-
-
-
Field Detail
-
identification
protected final RecordGroupIdentification identification
-
-
Constructor Detail
-
AbstractRecordGroup
protected AbstractRecordGroup(RecordGroupIdentification identification, String... fieldNames)
-
-
Method Detail
-
withFieldNames
protected void withFieldNames(PsseVersion.Major version, String... fieldNames)
-
withIO
protected void withIO(FileFormat fileFormat, com.powsybl.psse.model.io.RecordGroupIO<T> rw)
-
withIO
protected void withIO(FileFormat fileFormat, PsseVersion.Major version, com.powsybl.psse.model.io.RecordGroupIO<T> io)
-
withQuotedFields
protected void withQuotedFields(String... quotedFields)
-
getIdentification
public RecordGroupIdentification getIdentification()
-
fieldNames
public String[] fieldNames(PsseVersion version)
-
quotedFields
public String[] quotedFields()
-
read
public List<T> read(BufferedReader reader, Context context) throws IOException
- Throws:
IOException
-
write
public void write(List<T> psseObjects, Context context, OutputStream outputStream)
-
readHead
public T readHead(BufferedReader reader, Context context) throws IOException
- Throws:
IOException
-
writeHead
public void writeHead(T psseObject, Context context, OutputStream outputStream)
-
buildRecord
public String buildRecord(T object, String[] headers, String[] quoteFields, Context context)
-
-