Permalink
Browse files

awoods code review updates

  • Loading branch information...
awoods committed May 4, 2014
1 parent 9caddef commit fe3628d1016899c1326e203784d5631150733485
@@ -152,7 +152,7 @@ public static JcrRdfTools withContext(final IdentifierTranslator graphSubjects)
/**
* Factory method to create a new JcrRdfTools instance
*
* @param graphSubjects
* @param idTranslator
* @param session
* @return
*/
@@ -506,9 +506,9 @@ public String getPropertyNameFromPredicate(final Node node, final com.hp.hpl.jen
getNamespaceRegistry.apply(node);
return getJcrNameForRdfNode(namespaceRegistry,
predicate.getNameSpace(),
predicate.getLocalName(),
namespaceMapping);
predicate.getNameSpace(),
predicate.getLocalName(),
namespaceMapping);
}
/**
@@ -525,9 +525,9 @@ public String getPropertyNameFromPredicate(final com.hp.hpl.jena.rdf.model.Prope
final Map<String, String> namespaceMapping = emptyMap();
return getJcrNameForRdfNode(namespaceRegistry,
predicate.getNameSpace(),
predicate.getLocalName(),
namespaceMapping);
predicate.getNameSpace(),
predicate.getLocalName(),
namespaceMapping);
}
/**
@@ -543,25 +543,25 @@ public String getPropertyNameFromPredicate(final Node node,
final Map<String,String> namespaces) throws RepositoryException {
final NamespaceRegistry namespaceRegistry = getNamespaceRegistry.apply(node);
return getJcrNameForRdfNode(namespaceRegistry,
resource.getNameSpace(),
resource.getLocalName(),
namespaces);
resource.getNameSpace(),
resource.getLocalName(),
namespaces);
}
/**
* Get the JCR property name for an RDF predicate
*
* @param namespaceRegistry
* @param namespace
* @param localname
* @param rdfNamespace
* @param rdfLocalname
* @param namespaceMapping
* @return
* @throws RepositoryException
*/
public String getJcrNameForRdfNode(final NamespaceRegistry namespaceRegistry,
final String rdfNamespace,
final String rdfLocalname,
final Map<String, String> namespaceMapping)
private String getJcrNameForRdfNode(final NamespaceRegistry namespaceRegistry,
final String rdfNamespace,
final String rdfLocalname,
final Map<String, String> namespaceMapping)
throws RepositoryException {
final String prefix;
@@ -74,15 +74,13 @@ protected void operateOnMixin(final Resource mixinResource,
}
if (subjectNode.canAddMixin(mixinName)) {
LOGGER.debug("Adding mixin: {} to node: {}.", mixinName,
subjectNode.getPath());
LOGGER.debug("Adding mixin: {} to node: {}.", mixinName, subjectNode.getPath());
subjectNode.addMixin(mixinName);
} else {
throw new MalformedRdfException(
"Could not persist triple containing type assertion:"
+ mixinResource.toString()
+ " because no such mixin/type can be added to this node: "
+ subjectNode.getPath() + "!");
throw new MalformedRdfException("Could not persist triple containing type assertion: "
+ mixinResource.toString()
+ " because no such mixin/type can be added to this node: "
+ subjectNode.getPath() + "!");
}
}

0 comments on commit fe3628d

Please sign in to comment.