func (expr BooleanConstant) ToRDF(graph *argo.Graph) (term argo.Term) { if expr { return argo.NewLiteralWithDatatype("true", argo.XSD.Get("boolean")) } return argo.NewLiteralWithDatatype("false", argo.XSD.Get("boolean")) }
func (expr IntegerConstant) ToRDF(graph *argo.Graph) (term argo.Term) { return argo.NewLiteralWithDatatype(fmt.Sprintf("%d", float64(expr)), argo.XSD.Get("integer")) }
func (expr FloatConstant) ToRDF(graph *argo.Graph) (term argo.Term) { return argo.NewLiteralWithDatatype(fmt.Sprintf("%f", float64(expr)), argo.XSD.Get("double")) }
func (expr DataConstant) ToRDF(graph *argo.Graph) (term argo.Term) { return argo.NewLiteralWithDatatype(base64.StdEncoding.EncodeToString([]byte(expr)), argo.XSD.Get("base64Binary")) }