Пример #1
0
package main

import (
	"github.com/kierdavis/argo"
)

var LOOP = argo.NewNamespace("http://kierdavis.com/data/vocab/loop/")

var (
	XSDbase = ""

	XSDboolean            = XSDbase + "boolean"
	XSDbase64Binary       = XSDbase + "base64Binary"
	XSDhexBinary          = XSDbase + "hexBinary"
	XSDfloat              = XSDbase + "float"
	XSDdecimal            = XSDbase + "decimal"
	XSDinteger            = XSDbase + "integer"
	XSDnonPositiveInteger = XSDbase + "nonPositiveInteger"
	XSDnegativeInteger    = XSDbase + "negativeInteger"
	XSDlong               = XSDbase + "long"
	XSDint                = XSDbase + "int"
	XSDshort              = XSDbase + "short"
	XSDbyte               = XSDbase + "byte"
	XSDnonNegativeInteger = XSDbase + "nonNegativeInteger"
	XSDunsignedLong       = XSDbase + "unsignedLong"
	XSDunsignedInt        = XSDbase + "unsignedInt"
	XSDunsignedShort      = XSDbase + "unsignedShort"
	XSDunsignedByte       = XSDbase + "unsignedByte"
	XSDpositiveInteger    = XSDbase + "positiveInteger"
	XSDdouble             = XSDbase + "double"
	XSDanyURI             = XSDbase + "anyURI"
Пример #2
0
*/

package loop

import (
	"encoding/base64"
	"encoding/hex"
	"fmt"
	"github.com/kierdavis/argo"
	"strconv"
	"strings"
)

var XSD = argo.XSD
var LOOPBase = "http://kierdavis.com/data/vocab/loop/"
var LOOP = argo.NewNamespace(LOOPBase)

var Debug = false

func term2str(term argo.Term) (uri string) {
	res, isRes := term.(*argo.Resource)
	if isRes {
		return res.URI
	}
	return "_:" + term.(*argo.BlankNode).ID
}

type Resource argo.Term

type Interpreter struct {
	*argo.Graph