|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface only adds documentation to RDFWriter
.
The documentation identifies the properties that can be
set on RDF/XML and RDF/XML-ABBREV writers.
Field Summary | |
static java.lang.Object |
_NotInteresting
Suppress a compiler warning. |
Fields inherited from interface com.hp.hpl.jena.rdf.model.RDFWriter |
NSPREFIXPROPBASE |
Method Summary | |
java.lang.Object |
setProperty(java.lang.String propName,
java.lang.Object propValue)
Sets properties on this writer. |
Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFWriter |
setErrorHandler, write, write |
Field Detail |
public static final java.lang.Object _NotInteresting
Method Detail |
public java.lang.Object setProperty(java.lang.String propName, java.lang.Object propValue)
Properties to Control RDF/XML Output | |||
Property Name | Description | Value class | Legal Values |
---|---|---|---|
xmlbase | The value for xml:base in the file as a string. | String | a URI string, or null (default) |
longId | Whether to use long or short id's for anon resources. Short id's are easier to read and are the default, but can run out of memory on very large models. | String or Boolean | "true", "false" (default) |
allowBadURIs | URIs in the graph are, by default, checked prior to serialization. | String or Boolean | "true", "false" (default) |
relativeURIs |
What sort of relative URIs should be used.
A comma separate list of options:
|
String | |
showXmlDeclaration | If true, an XML Declaration is included in the output, if false
no XML declaration is included.
The default behaviour only gives an XML Declaration when
asked to write to an OutputStreamWriter that uses some
encoding other than UTF-8 or UTF-16.
In this case the encoding is shown
in the XML declaration.
To ensure that the encoding attribute is shown in the XML declaration
either use the write(Model,Writer,String)
variant with an appropriate OutputStreamWriter or set this option
to false write the declaration to an OutputStream before calling
write(Model,OutputStream,String) .
|
true, "true", false, "false" or "default" | |
tab | The number of spaces with which to indent XML child elements. | String or Integer | positive integer "2" is the default |
width | A guide to the num of cols before inserting an arbitrary newline. | String or Integer | positive integer "60" is the default |
attributeQuoteChar | How to write XML attributes. | String | "\"" or "'" |
blockRules |
A list of Resource or a String being a comma separated list
of fragment
IDs from
http://www.w3.org/TR/rdf-syntax-grammar indicating
grammar rules that will not be used.
Rules that can be avoided are:
DAML_OIL.collection )
can be blocked. Blocking idAttr also blocks
section-Reification.
For the basic writer (RDF/XML) only
parseTypeLiteralPropertyElt
has any affect, since none of the other rules are implemented by that writer.
| Resource[] or String | |
prettyTypes | Only for the RDF/XML-ABBREV writer.
This a list of
the types of the principal objects in the model. The writer
will tend to create RDF/XML with resources of these types at the
top level.
Example usage showing the default value: w.setProperty("prettyTypes", new Resource[]{ DAML_OIL.Ontology, OWL.Ontology, DAML_OIL.Datatype, OWL.Datatype, RDFS.Datatype, DAML_OIL.Class, RDFS.Class, OWL.Class, DAML_OIL.Property, OWL.ObjectProperty, RDF.Property, DAML_OIL.ObjectProperty, OWL.DatatypeProperty, DAML_OIL.DatatypeProperty, OWL.TransitiveProperty, OWL.SymmetricProperty, OWL.FunctionalProperty, OWL.InverseFunctionalProperty, DAML_OIL.TransitiveProperty, DAML_OIL.UnambiguousProperty, DAML_OIL.UniqueProperty, }); | Resource[] |
setProperty
in interface RDFWriter
propName
- One of "xmlBase", "LongId", "allowBadURIs",
"relativeURIs","showXMLDeclaration", "tab", "attributeQuoteChar",
"blockRules", "prettyTypes"propValue
- A String, Boolean, Integer, Resource[] as appropriate.
null
if no value was set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |