Package org.trellisldp.rdfa
Class DefaultRdfaWriterService
- java.lang.Object
-
- org.trellisldp.rdfa.DefaultRdfaWriterService
-
- All Implemented Interfaces:
RDFaWriterService
@ApplicationScoped public class DefaultRdfaWriterService extends Object implements RDFaWriterService
An RDFa (HTML) serialization service.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIG_RDFA_CSS
The configuration key controlling the CSS URLs to use.static String
CONFIG_RDFA_ICON
The configuration key controlling the web icon to use.static String
CONFIG_RDFA_JS
The configuration key controlling the JS URLs to use.static String
CONFIG_RDFA_TEMPLATE
The configuration key controlling the HTML template to use.
-
Constructor Summary
Constructors Constructor Description DefaultRdfaWriterService()
Create an HTML Serializer object.DefaultRdfaWriterService(NamespaceService namespaceService)
Create an HTML Serializer object.DefaultRdfaWriterService(NamespaceService namespaceService, String template, String css, String js, String icon)
Create an HTML Serializer object.DefaultRdfaWriterService(NamespaceService namespaceService, String template, List<String> css, List<String> js, String icon)
Create an HTML Serializer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(Stream<Triple> triples, OutputStream out, String subject)
Send the content to an output stream.
-
-
-
Field Detail
-
CONFIG_RDFA_TEMPLATE
public static final String CONFIG_RDFA_TEMPLATE
The configuration key controlling the HTML template to use.- See Also:
- Constant Field Values
-
CONFIG_RDFA_CSS
public static final String CONFIG_RDFA_CSS
The configuration key controlling the CSS URLs to use.- See Also:
- Constant Field Values
-
CONFIG_RDFA_ICON
public static final String CONFIG_RDFA_ICON
The configuration key controlling the web icon to use.- See Also:
- Constant Field Values
-
CONFIG_RDFA_JS
public static final String CONFIG_RDFA_JS
The configuration key controlling the JS URLs to use.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultRdfaWriterService
public DefaultRdfaWriterService()
Create an HTML Serializer object.
-
DefaultRdfaWriterService
@Inject public DefaultRdfaWriterService(NamespaceService namespaceService)
Create an HTML Serializer object.- Parameters:
namespaceService
- a namespace service
-
DefaultRdfaWriterService
public DefaultRdfaWriterService(NamespaceService namespaceService, String template, String css, String js, String icon)
Create an HTML Serializer object.- Parameters:
namespaceService
- a namespace servicetemplate
- the template locationcss
- the css to use (comma-delimited for multiple css documents)js
- the js to use (comma-delimited for multiple js documents)icon
- an icon, may benull
-
DefaultRdfaWriterService
public DefaultRdfaWriterService(NamespaceService namespaceService, String template, List<String> css, List<String> js, String icon)
Create an HTML Serializer object.- Parameters:
namespaceService
- a namespace servicetemplate
- the template locationcss
- the css to use (comma-delimited for multiple css documents)js
- the js to use (comma-delimited for multiple js documents)icon
- an icon, may benull
-
-
Method Detail
-
write
public void write(Stream<Triple> triples, OutputStream out, String subject)
Send the content to an output stream.- Specified by:
write
in interfaceRDFaWriterService
- Parameters:
triples
- the triplesout
- the output streamsubject
- the subject
-
-