Skip to content

Commit

Permalink
Changed package name
Browse files Browse the repository at this point in the history
  • Loading branch information
edmondchuc committed Aug 16, 2020
1 parent 5ac254c commit 1188d7c
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
1 change: 0 additions & 1 deletion gordf/bnode.go

This file was deleted.

14 changes: 7 additions & 7 deletions parser/nt.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ package parser
import (
"fmt"
"github.com/iand/ntriples"
"gordf/gordf"
"gordf/rdf"
"os"
)

func getGoRDFNode(node ntriples.RdfTerm) gordf.Node {
func getGoRDFNode(node ntriples.RdfTerm) rdf.Node {
if node.IsIRI() {
return gordf.NewURI(node.Value)
return rdf.NewURI(node.Value)
} else if node.IsBlank() {
panic("Blank nodes for memory graph not supported yet.")
} else if node.IsLiteral() {
return gordf.NewLiteral(node.Value)
return rdf.NewLiteral(node.Value)
} else if node.IsLanguageLiteral() {
return gordf.NewLiteralWithLanguage(node.Value, node.Language)
return rdf.NewLiteralWithLanguage(node.Value, node.Language)
} else if node.IsTypedLiteral() {
return gordf.NewLiteralWithDatatype(node.Value, gordf.NewURI(node.DataType))
return rdf.NewLiteralWithDatatype(node.Value, rdf.NewURI(node.DataType))
} else {
panic("Error.")
}
}

func ParseNT(graph *gordf.Graph, file string) {
func ParseNT(graph *rdf.Graph, file string) {
ntfile, err := os.Open(file)
if err != nil {
fmt.Fprintf(os.Stderr, "Error: %s", err.Error())
Expand Down
4 changes: 2 additions & 2 deletions parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package parser

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

func ParseFile(graph *gordf.Graph, file, format string) {
func ParseFile(graph *rdf.Graph, file, format string) {
switch format {
case "nt":
ParseNT(graph, file)
Expand Down
1 change: 1 addition & 0 deletions rdf/bnode.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package rdf
2 changes: 1 addition & 1 deletion gordf/graph.go → rdf/graph.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gordf
package rdf

import (
"gordf/set"
Expand Down
2 changes: 1 addition & 1 deletion gordf/literal.go → rdf/literal.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gordf
package rdf

import "fmt"

Expand Down
2 changes: 1 addition & 1 deletion gordf/literal_test.go → rdf/literal_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gordf
package rdf

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion gordf/node.go → rdf/node.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gordf
package rdf

// An RDF resource interface.
type Node interface {
Expand Down
2 changes: 1 addition & 1 deletion gordf/triple.go → rdf/triple.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gordf
package rdf

type Triple struct {
S Node
Expand Down
2 changes: 1 addition & 1 deletion gordf/uri.go → rdf/uri.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gordf
package rdf

import "fmt"

Expand Down
2 changes: 1 addition & 1 deletion gordf/uri_test.go → rdf/uri_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gordf
package rdf

import "testing"

Expand Down

0 comments on commit 1188d7c

Please sign in to comment.