Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Redundant statement of adding label to the label list? #3

Open
chenmiao opened this issue Apr 22, 2014 · 4 comments
Open

Redundant statement of adding label to the label list? #3

chenmiao opened this issue Apr 22, 2014 · 4 comments

Comments

@chenmiao
Copy link

Still the same code block, where there is a statement about adding lbl to the lableList

for (Label lbl : labels) {
if (label.equals(lbl)) {//it seems should't be this way, but should be label.name.equals(lbl)
hit = true;
break;
}
labelList.add(lbl);
}

This looks to be a redundant line because the next code block does the same thing: adding non-hit label to the labelList

if (!hit) {
labelList.add(label); //seems to be redundant because of above statement labelList.add(lbl);
db.setNodeLabels(subjectNode, labelList.toArray(new Label[labelList.size()]));
addedLabels++;
}

So the line can be crossed out?

@mybyte
Copy link
Owner

mybyte commented Apr 22, 2014

Hi!

That code is ridiculously deprecated. The API probably had some changes
since then.

Regards,
Michael

On Dienstag, 22. April 2014 18:51:33, chenmiao wrote:

Still the same code block, where there is a statement about adding lbl
to the lableList

for (Label lbl : labels) {

if (label.equals(lbl)) {//it seems should't be this way, but should be
label.name.equals(lbl)
hit = true;
break;
}
labelList.add(lbl);
}

This looks to be a redundant line because the next code block does the
same thing: adding non-hit label to the labelList

if (!hit) {
labelList.add(label); //seems to be redundant because of above
statement labelList.add(lbl);
db.setNodeLabels(subjectNode, labelList.toArray(new
Label[labelList.size()]));
addedLabels++;
}

So the line can be crossed out?


Reply to this email directly or view it on GitHub
#3.

@chenmiao
Copy link
Author

Ok. Thanks. I found your code through Neo4j site
http://www.neo4j.org/develop/linked_data

Is there updated version of the code? Or some public code you would
recommend for importing RDF to Neo4j?

Since there could be some people like me, knowing something about semantic
web, but not so much Neo4j and would like to try RDF triples in Neo4j, some
tutorial like this really helps.

It'd be definitely good to update the code to reduce people's questions
like mine too :) But I also understand that it's a demo code.

Thanks,
Miao

@mybyte
Copy link
Owner

mybyte commented Apr 22, 2014

Hey Miao,

actually, you're not the first one to mail me about that stuff. I'm a
bit busy right now though. As soon as I get some spare time, I'll
update my blog http://michaelbloggs.blogspot.com/

There are quite some issues to talk about. But I'll spare you the
trouble: there's no nice and easy way of handling ontologies with
classic graph databases, because they don't understand restrictions /
equivalence classes and complex types (especially complex typing of
relationships). Especially when looking into advanced reasoning, this
is a bummer.

Regards,
Michael

On Dienstag, 22. April 2014 21:03:24, chenmiao wrote:

Ok. Thanks. I found your code through Neo4j site
http://www.neo4j.org/develop/linked_data

Is there updated version of the code? Or some public code you would
recommend for importing RDF to Neo4j?

Since there could be some people like me, knowing something about semantic
web, but not so much Neo4j and would like to try RDF triples in Neo4j,
some
tutorial like this really helps.

It'd be definitely good to update the code to reduce people's questions
like mine too :) But I also understand that it's a demo code.

Thanks,
Miao


Reply to this email directly or view it on GitHub
#3 (comment).

@chenmiao
Copy link
Author

Thanks for your suggestions, Michael. It seems the bridging between RDF/OWL
model and graph database model may not be mature yet, but hopefully graph
database can help with non-complex queries.

Sure, look forward to the updated blog. Thanks.

Best,
Miao

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants