Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add the annotation @htmltemplate to allow JAX-B methods to hint at
the appropriate HTML template for the Dataset -> HTML provider (e.g. when no node-backed dataset is available)
- Loading branch information
Showing
12 changed files
with
237 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
fcrepo-http-commons/src/main/java/org/fcrepo/responses/HtmlTemplate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.fcrepo.responses; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Target({ElementType.METHOD}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface HtmlTemplate { | ||
String value(); | ||
} |
56 changes: 0 additions & 56 deletions
56
fcrepo-http-commons/src/main/java/org/fcrepo/responses/VelocityViewer.java
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
fcrepo-http-commons/src/main/resources/views/jcr-namespaces.vsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#* @vtlvariable name="rdf" type="com.hp.hpl.jena.sparql.core.DatasetGraph" *# | ||
#* @vtlvariable name="subjects" type="com.hp.hpl.jena.rdf.model.ResIterator" *# | ||
#* @vtlvariable name="nodeany" type="com.hp.hpl.jena.graph.Node" *# | ||
#* @vtlvariable name="topic" type="com.hp.hpl.jena.graph.Node" *# | ||
#parse("views/common.vsl") | ||
<html> | ||
<head> | ||
<title>registered namespaces</title> | ||
#parse("views/common-header.vsl") | ||
</head> | ||
<body> | ||
<h1>namespaces</h1> | ||
|
||
## output other nodes | ||
#foreach($subject in $subjects) | ||
#triples($subject.asNode()) | ||
#end | ||
</body> | ||
</html> |
File renamed without changes.
33 changes: 33 additions & 0 deletions
33
fcrepo-http-commons/src/main/resources/views/search-results.vsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#* @vtlvariable name="rdf" type="com.hp.hpl.jena.sparql.core.DatasetGraph" *# | ||
#* @vtlvariable name="subjects" type="com.hp.hpl.jena.rdf.model.ResIterator" *# | ||
#* @vtlvariable name="nodeany" type="com.hp.hpl.jena.graph.Node" *# | ||
#* @vtlvariable name="topic" type="com.hp.hpl.jena.graph.Node" *# | ||
#parse("views/common.vsl") | ||
<html> | ||
<head> | ||
<title>Search results</title> | ||
#parse("views/common-header.vsl") | ||
</head> | ||
<body> | ||
<h1>Search Results: $topic</h1> | ||
|
||
|
||
## output actions | ||
<div class="actions"> | ||
<form method="GET"> | ||
<input type="text" name="q" /> | ||
<input type="submit" value="search"/> | ||
</form> | ||
</div> | ||
|
||
## output triples for the topic node | ||
#triples($topic) | ||
|
||
## output other nodes | ||
#foreach($subject in $subjects) | ||
#if( $subject != $topic ) | ||
#triples($subject.asNode()) | ||
#end | ||
#end | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.