java.lang.Object
org.apache.jena.rdfxml.xmloutput.impl.BaseXMLWriter
- All Implemented Interfaces:
RDFWriterI
,RDFXMLWriterI
- Direct Known Subclasses:
RDFXML_Abbrev
,RDFXML_Basic
This is not part of the public API.
Base class for XML serializers.
All methods with side-effects should be synchronized in this class and its
subclasses. (i. e. XMLWriters assume that the world is not changing around
them while they are writing).
Functionality:
- setProperty etc
- namespace prefixes
- xmlbase
- relative URIs
- encoding issues
- anonymous node presentational
- errorHandler
-
Field Summary
Fields inherited from interface org.apache.jena.rdf.model.RDFWriterI
NSPREFIXPROPBASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal String
getPrefixFor
(String uri) boolean
isPredefinedEntityName
(String name) setErrorHandler
(RDFErrorHandler errHandler) Set an error handler.static SimpleLogger
final void
setNsPrefix
(String prefix, String ns) final Object
setProperty
(String propName, Object propValue) Set the writer property propName to the value obtained from propValue.static int
final void
write
(Model model, OutputStream out, String base) Write out an XML serialization of a model.void
Serialize Modelmodel
to Writerout
.
-
Constructor Details
-
BaseXMLWriter
public BaseXMLWriter()
-
-
Method Details
-
setLogger
-
setNsPrefix
-
getPrefixFor
-
write
Write out an XML serialization of a model.- Specified by:
write
in interfaceRDFWriterI
- Parameters:
model
- the model to be serializedout
- the OutputStream to receive the serializationbase
- The URL at which the file will be placed.
-
write
Serialize Modelmodel
to Writerout
.- Specified by:
write
in interfaceRDFWriterI
- Parameters:
model
- The model to be written.out
- The Writer to which the serialization should be sent.base
- the base URI for relative URI calculations.null
means use only absolute URI's.
-
isPredefinedEntityName
-
setErrorHandler
Set an error handler.- Specified by:
setErrorHandler
in interfaceRDFWriterI
- Parameters:
errHandler
- The new error handler to be used, or null for the default handler.- Returns:
- the old error handler
-
setProperty
Set the writer property propName to the value obtained from propValue. Return an Object representation of the original value.- Specified by:
setProperty
in interfaceRDFWriterI
- Specified by:
setProperty
in interfaceRDFXMLWriterI
- Parameters:
propName
- One of "xmlBase", "longId", "allowBadURIs", "relativeURIs","showXMLDeclaration", "tab", "attributeQuoteChar", "blockRules", "prettyTypes", "showDoctypeDeclaration", "width"propValue
- A String, Boolean, Integer, Resource[] as appropriate.- Returns:
- the old value for this property, or
null
if no value was set. - See Also:
-
str2flags
-