Documentation ¶
Index ¶
- func ExportToFile(quads []quad.Quad, outFileName string, formatName string)
- func GetFormatter(outFileName string, formatName string) (format *quad.Format)
- func ImportFromFile(inFileName string, formatName string) ([]quad.Quad, error)
- func NewQuadWriter(quads *[]quad.Quad) quad.Writer
- func ReadFromTurtle(ttlPath string, baseURI string, useShortIRI bool) ([]quad.Quad, error)
- func ReadFromYaml(yamlPath string, dst interface{}) error
- func SaveToYaml(yamlPath string, src interface{}) error
- type QuadWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportToFile ¶
Export `quads` into a file named `outFileName` in `formatName` representational format. If `outFileName` equals to "" then the results will be written to the `os.Stdout`. The following formats can be identified via several methods:
|-----------|-----------|------------------------| | name | extension | mime-type | |-----------|-----------|------------------------| | nquads | .nq, .nt | application/n-quads, | | | | application/n-triplets | |-----------|-----------|------------------------| | jsonld | .jsonld | application/ld+json | |-----------|-----------|------------------------| | json | .json | application/json | |-----------|-----------|------------------------| | graphml | .graphml | application/xml | |-----------|-----------|------------------------| | gml | .gml | | |-----------|-----------|------------------------| | graphviz | .gv, .dot | | |-----------|-----------|------------------------|
func GetFormatter ¶
Get the formatter selected either by the `formatName` or by the file extension.
func ImportFromFile ¶
func ReadFromTurtle ¶
ReadFromTTL reads a ttl file and return a slice of quads
func ReadFromYaml ¶
Read YAML file and unmarshal its content into the `dst` data structure, using the `yaml` annotation of the structs.
func SaveToYaml ¶
Marshal the content from the `dst` data structure, and savel into a YAML file using the `yaml` annotation of the structs.
Types ¶
type QuadWriter ¶
type QuadWriter struct {
// contains filtered or unexported fields
}
func (QuadWriter) WriteQuads ¶
func (qw QuadWriter) WriteQuads(buf []quad.Quad) (int, error)
Directories ¶
Path | Synopsis |
---|---|
Package graphml provides an encoder for GraphML format
|
Package graphml provides an encoder for GraphML format |
Click to show internal directories.
Click to hide internal directories.