public class CompactNodeTypeDefWriter extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
CompactNodeTypeDefWriter.NamespaceMapping
Map namespace prefixes such as present in a qualified JCR name to
the corresponding namespace URI.
|
Constructor and Description |
---|
CompactNodeTypeDefWriter(Writer out,
CompactNodeTypeDefWriter.NamespaceMapping nsMapping,
boolean includeNS)
Creates a new nodetype writer based on a session
|
CompactNodeTypeDefWriter(Writer out,
Session session,
boolean includeNS)
Creates a new nodetype writer based on a session
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Flushes all pending write operations and Closes this writer.
|
static void |
write(Collection<NodeTypeDefinition> defs,
CompactNodeTypeDefWriter.NamespaceMapping nsMapping,
Writer out)
Writes the given list of QNodeTypeDefinition to the output writer
including the used namespaces.
|
static void |
write(Collection<NodeTypeDefinition> defs,
Session session,
Writer out)
Writes the given list of QNodeTypeDefinition to the output writer including the
used namespaces.
|
void |
write(NodeTypeDefinition ntd)
Write one NodeTypeDefinition to this writer
|
void |
writeNamespaceDeclaration(String prefix)
Write a namespace declaration to this writer.
|
public CompactNodeTypeDefWriter(Writer out, Session session, boolean includeNS)
out
- the underlying writersession
- repository sessionincludeNS
- if true
all used namespace decl. are also
written to the writerpublic CompactNodeTypeDefWriter(Writer out, CompactNodeTypeDefWriter.NamespaceMapping nsMapping, boolean includeNS)
out
- the underlying writernsMapping
- the mapping from prefix to namespace URI.includeNS
- if true
all used namespace decl. are also
written to the writerpublic static void write(Collection<NodeTypeDefinition> defs, Session session, Writer out) throws IOException
defs
- collection of definitionssession
- sessionout
- output writerIOException
- if an I/O error occurspublic static void write(Collection<NodeTypeDefinition> defs, CompactNodeTypeDefWriter.NamespaceMapping nsMapping, Writer out) throws IOException
defs
- collection of definitionsnsMapping
- the mapping from prefix to namespace URI.out
- output writerIOException
- if an I/O error occurspublic void write(NodeTypeDefinition ntd) throws IOException
ntd
- node type definitionIOException
- if an I/O error occurspublic void writeNamespaceDeclaration(String prefix) throws IOException
prefix
- namespace prefixIOException
- if an I/O error occurspublic void close() throws IOException
IOException
- if an I/O error occursCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.