public class CompactNodeTypeDefWriter
extends java.lang.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(java.io.Writer out,
CompactNodeTypeDefWriter.NamespaceMapping nsMapping,
boolean includeNS)
Creates a new nodetype writer based on a session
|
CompactNodeTypeDefWriter(java.io.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(java.util.Collection<NodeTypeDefinition> defs,
CompactNodeTypeDefWriter.NamespaceMapping nsMapping,
java.io.Writer out)
Writes the given list of QNodeTypeDefinition to the output writer
including the used namespaces.
|
static void |
write(java.util.Collection<NodeTypeDefinition> defs,
Session session,
java.io.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(java.lang.String prefix)
Write a namespace declaration to this writer.
|
public CompactNodeTypeDefWriter(java.io.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(java.io.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(java.util.Collection<NodeTypeDefinition> defs, Session session, java.io.Writer out) throws java.io.IOException
defs
- collection of definitionssession
- sessionout
- output writerjava.io.IOException
- if an I/O error occurspublic static void write(java.util.Collection<NodeTypeDefinition> defs, CompactNodeTypeDefWriter.NamespaceMapping nsMapping, java.io.Writer out) throws java.io.IOException
defs
- collection of definitionsnsMapping
- the mapping from prefix to namespace URI.out
- output writerjava.io.IOException
- if an I/O error occurspublic void write(NodeTypeDefinition ntd) throws java.io.IOException
ntd
- node type definitionjava.io.IOException
- if an I/O error occurspublic void writeNamespaceDeclaration(java.lang.String prefix) throws java.io.IOException
prefix
- namespace prefixjava.io.IOException
- if an I/O error occurspublic void close() throws java.io.IOException
java.io.IOException
- if an I/O error occursCopyright © 2010 - 2020 Adobe. All Rights Reserved