Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attr ¶
type Attr struct { Encoding string `xml:"encoding,attr"` FieldsTerminatedBy string `xml:"fieldsTerminatedBy,attr"` LinesTerminatedBy string `xml:"linesTerminatedBy,attr"` FieldsEnclosedBy string `xml:"fieldsEnclosedBy,attr"` IgnoreHeaderLines string `xml:"ignoreHeaderLines,attr"` RowType string `xml:"rowType,attr"` Files Files `xml:"files"` Fields []Field `xml:"field"` }
Attr holds the common fields for Core and Extension.
type CoreData ¶
type CoreData struct { // Index is the field index of the Core's Term. Index int // Term is the field name of the main Core Data (Topic). Term string // TermFull is the URI of the main Core Data (Topic). TermFull string // Location is the location of the Core file. Location string // FieldsData is a map of field Terms to their FieldData. FieldsData map[string]FieldData // FieldsIdx is a map of field indices to their FieldData. FieldsIdx map[int]FieldData }
CoreData is a simplified version of Core data of the DwCA archive.
type ErrMetaDecoder ¶
type ErrMetaDecoder struct { // OrigErr is the original error. OrigErr error }
ErrMetaDecoder is an error type for decoding meta.xml files.
func (*ErrMetaDecoder) Error ¶
func (e *ErrMetaDecoder) Error() string
type ErrMetaReader ¶
type ErrMetaReader struct { // OrigErr is the original error. OrigErr error }
ErrMetaReader is an error type for reading meta.xml files.
func (*ErrMetaReader) Error ¶
func (e *ErrMetaReader) Error() string
type ExtensionData ¶
type ExtensionData struct { // CoreIndex is the index of the Core main field in the Extension. // It allows to create a star schema of the DwCA archive. CoreIndex int // Location is the location of the Extension file. Location string // FieldsData is a map of field Terms to their FieldData. FieldsData map[string]FieldData // FieldsIdx is a map of field indices to their FieldData. FieldsIdx map[int]FieldData }
ExtensionData is a simplified version of Extensions data of the DwCA.
type Field ¶
type Field struct { // Index is the verbatim index of the field. Index string `xml:"index,attr"` // Idx is the int version of Index. Idx int `xml:"-"` // Term is the URI of the term. Term string `xml:"term,attr"` }
Field holds the fields of the data.
type FieldData ¶
type FieldData struct { // Index is the index of the field in the DwCA archive. Index int // Term is the field name of the field. Term string // TermFull is the URI of the field. TermFull string }
FieldData is a simplified version of a field in the DwCA archive.
type Files ¶
type Files struct { // Location provides path to a file. Location string `xml:"location"` }
Files holds the location of files.
type Meta ¶
type Meta struct {
Archive `xml:"archive"`
}
func (*Meta) Simplify ¶
func (m *Meta) Simplify() *MetaSimple
type MetaSimple ¶
type MetaSimple struct { // CoreData is a simplified version of Core data of the DwCA archive. CoreData // ExtensionsData is a simplified version of Extensions data of the DwCA. ExtensionsData map[string]ExtensionData }
MetaSimple is a simplifiec version of Meta object, that is used to access metadata fields by their names or indices.
Click to show internal directories.
Click to hide internal directories.