Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BNodes are BNodes and should be treated as such #748

Closed
wants to merge 21 commits into from
Closed

Conversation

ajs6f
Copy link
Contributor

@ajs6f ajs6f commented Mar 13, 2015

DO NOT MERGE YET

@ajs6f ajs6f force-pushed the BNodesAreBNodes branch 4 times, most recently from bb4129c to 86dca3a Compare March 18, 2015 14:23

/**
* @param idTranslator
* @param context
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change context to model
...and add meaningful descriptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Meaning descriptions"?

@ajs6f ajs6f force-pushed the BNodesAreBNodes branch 2 times, most recently from 32341d5 to b702d42 Compare April 6, 2015 17:54
@@ -141,6 +146,10 @@

protected abstract String externalPath();

protected Deskolemizer deskolemizer() {
return deskolemizer == null ? deskolemizer = new Deskolemizer(translator(), null) : deskolemizer;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please unpack this single statement into its intelligible, multi-line parts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should make such style considerations clear and get them into Checkstyle rules, if you intend to enforce them.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be great if we could encode subjective measures of "readability" into checkstyles. I try not to encroach on other's style preferences, but when a style impedes personal readability, I raise the flag.
Thanks for the niggly update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are objecting to the ternary operator, then that should be encoded in Checkstyle. If, on the other hand, your qualm is genuinely subjective, it's not a valid criticism.

}

return idTranslator;
return idTranslator == null ? idTranslator =
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the reasons above (and the fact that no logic is being changed here), please revert this update.

*
* @author ajs6f
*/
public class Deskolemizer implements Function<Triple, Triple> {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't Deskolemizer implement Deskolemizer?
...which would strongly argue for a different name of the implementing class, e.g. DeskolemizerImpl.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is an oversight. As far as the name goes, I don't know how much difference it makes. The only reason that there is a Deskolemizer interface is because the workings of this process tangle up into the kernel API, not because we have any reasonable expectation of more than one implementation of deskolemization. There is no clean way to introduce blank nodes, and this code is crap, but it's as good as I think we can expect to do. If you think it clearer, I can certainly change the name here to DeskolemizerImpl.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would either suggest:

  1. Change the implementation name to DeskolemizerImpl and have it implement Deskolemizer, or
  2. Simply remove the Deskolemizer interface.

}
private final Skolemizer skolemizer;

private final Service<Container> skolemAndHashCreator;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given its type and use of skolemAndHashCreator in this class, I would find it more clear if the variable were named containerService.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree. containerService is just a restatement of the type of the param. skolemAndHashCreator actually explains how the param is used. I'd like to hear from someone else.

existingAncestorPath.deleteCharAt(existingAncestorPath.length() - 1);
}
break;
String potentialPath = path.startsWith("/") ? path : "/" + path;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I see the relevance of this update in this PR... but I guess it is an improvement

@awoods
Copy link

awoods commented Apr 14, 2015

Resolved with: ceacc98

@awoods awoods closed this Apr 14, 2015
@osmandin osmandin deleted the BNodesAreBNodes branch August 28, 2015 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants