Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use a generic node template when no primary-type-based template exists
  • Loading branch information
cbeer committed Jul 8, 2013
1 parent f5e36d1 commit e57676f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -158,7 +158,7 @@ void init() throws IOException, RepositoryException {
}

List<String> otherTemplates =
ImmutableList.of("search:results", "jcr:namespaces");
ImmutableList.of("search:results", "jcr:namespaces", "node");

for (String key : otherTemplates) {
final Template template =
Expand Down Expand Up @@ -248,6 +248,11 @@ private Template getTemplate(final Dataset rdf, final Node subject,
template = templatesMap.get(nodeType);
}

if (template == null) {
LOGGER.debug("Falling back on default node template");
template = templatesMap.get("node");
}

LOGGER.debug("Choosing template: {}", template.getName());
return template;
}
Expand Down

0 comments on commit e57676f

Please sign in to comment.