Git Product home page Git Product logo

node-rdf's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-rdf's Issues

add literals with triple quotes

is there a way to create docstrings ( i.e. literals with triple quotes) when using built-in mode?
I would like to have string.l() which returns """ value """

Use "Builtins" only?

Hi,

I try to use the "Builtins" feature of node-rdf to make the resulting code more readable, but I cannot create a triple by simply calling rdfEnvironment.createTriple(string, string, string) -- this triggers an error because the Triple constructor checks the type of the arguments (cf. RDFNode.js:29ff). Is this intended? Am I using the "Builtins" feature wrong? Or should this be possible? Is there another way how I can create a triple with the "Builtins" feature?

Kind regards,
Chris

Package.json missing?

Hello there I was trying to find the package.json, but I could not find it! Is it on github?

TripletGraph missing?

TripletGraph seems to have disappeared when I install from npm. Roughly:

$ npm install rdf
$ node
> rdf = require('rdf')
> rdf.TripletGraph
undefined

PrefixMap.shrink may return incorrect result in case of overlapping namespace URIs

if namespace uri's are overlapping, like in the example below, PrefixMap.shrink sometime returns incorrect results, depending on the order of namespace declarations, e.g.

@Prefix xmp: http://ns.adobe.com/xap/1.0/ .
@Prefix xmpMM: http://ns.adobe.com/xap/1.0/mm/ .
@Prefix xmpRights: http://ns.adobe.com/xap/1.0/rights/ .

turtleParser.environment.prefixes.shrink('http://ns.adobe.com/xap/1.0/mm/DocumentID') -> 'xmp:mm/DocumentID' instead of 'xmpMM:DocumentID'

Datatypes written with prefix are not expanded

Turtle files with datatypes written with prefixes, eg: "1"^^xsd:number are not expanded to "http://www.w3.org/2001/XMLSchema#number" when parsing.

What I'm doing

let graph = env.createGraph();
let turtleParser = new rdf.TurtleParser();
turtleParser.parse(rdfText, function () {
    graph.forEach(triple => {
        console.log(triple.object.datatype);
    })
}, "", null, graph);

Example turtle

@prefix sh: <http://www.w3.org/ns/shacl#>.
@prefix : <http://example.com/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.

:person1 :age "1"^^xsd:number .

:person1 a :Person.

Prints

xsd:number

Should print

http://www.w3.org/2001/XMLSchema#number

Print profile

Hello,

I would like to know if exists some function to print the profile,
I want to reconstruct the complete turtle file based on a graph I know how to print the triples
and create a string variable, but I don't find the way to print in the top of the file the prefix.

how to query for blank node subject triples

Say I've got a graph that refers to a blank node object "b1". How do I query for triples where "b1" is the subject?

<#me>
  a foaf:Person;
  cert:key [                             # the object here is blank node "b1"
    a cert:RSAPublicKey;       # these are the triples I want to find
    cert:exponent 65537;
    cert:modulus "..."
  ].

The closest I can seem to get is graph.match("_:b1", null, null), which at least recognizes that I'm looking for a blank node, but throws with "unexpected BlankNode syntax". I can also find triples related to the predicate with graph.match(null, "cert:exponent", null), but that still requires that I manually filter for the subject I'm looking for.

Release latest version to npm

Hi,

I've installed node-rdf via npm and encountered that the latest release there does not implement graph.removeMatches yet .. Could you release the latest commit as version to npm? Thanks.

Kind regards,
Chris

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.