Skip to content

Commit

Permalink
Added main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
edmondchuc committed Aug 16, 2020
1 parent 1188d7c commit 6d0e42d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package main

import (
"fmt"
"gordf/parser"
"gordf/rdf"
)

func main() {
g := rdf.Graph{}

parser.ParseFile(&g, "data.nt", "nt")

rdfType := rdf.NewURI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
schemaName := rdf.NewURI("http://schema.org/name")

for triple := range g.Triples(rdf.None{}, rdfType, rdf.NewURI("http://schema.org/Organization")) {
for triple := range g.Triples(triple.S, schemaName, rdf.None{}) {
fmt.Println(triple)
}
}
}

0 comments on commit 6d0e42d

Please sign in to comment.