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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetPrefixFor(String uri) booleanisPredefinedEntityName(String name) setErrorHandler(RDFErrorHandler errHandler) Set an error handler.static SimpleLoggerfinal voidsetNsPrefix(String prefix, String ns) final ObjectsetProperty(String propName, Object propValue) Set the writer property propName to the value obtained from propValue.static intfinal voidwrite(Model model, OutputStream out, String base) Write out an XML serialization of a model.voidSerialize Modelmodelto Writerout.
-
Constructor Details
-
BaseXMLWriter
public BaseXMLWriter()
-
-
Method Details
-
setLogger
-
setNsPrefix
-
getPrefixFor
-
write
Write out an XML serialization of a model.- Specified by:
writein 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 Modelmodelto Writerout.- Specified by:
writein 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.nullmeans use only absolute URI's.
-
isPredefinedEntityName
-
setErrorHandler
Set an error handler.- Specified by:
setErrorHandlerin 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:
setPropertyin interfaceRDFWriterI- Specified by:
setPropertyin 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
nullif no value was set. - See Also:
-
str2flags
-