Class CompactNodeTypeDefWriter
- java.lang.Object
-
- org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefWriter
-
- org.apache.jackrabbit.spi.commons.nodetype.compact.CompactNodeTypeDefWriter
-
public class CompactNodeTypeDefWriter extends CompactNodeTypeDefWriter
Prints node type defs in a compact notation Print Format: <ex = "http://apache.org/jackrabbit/example"> [ex:NodeType] > ex:ParentType1, ex:ParentType2 orderable mixin - ex:property (STRING) = 'default1', 'default2' primary mandatory autocreated protected multiple VERSION < 'constraint1', 'constraint2' + ex:node (ex:reqType1, ex:reqType2) = ex:defaultType mandatory autocreated protected multiple VERSION
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefWriter
CompactNodeTypeDefWriter.NamespaceMapping
-
-
Constructor Summary
Constructors Constructor Description CompactNodeTypeDefWriter(Writer out, Session s, boolean includeNS)
Creates a new nodetype writer based on a sessionCompactNodeTypeDefWriter(Writer out, NamespaceResolver r, boolean includeNS)
Creates a new nodetype writer based on a namespace resolverCompactNodeTypeDefWriter(Writer out, NamespaceResolver r, NamePathResolver npResolver)
Creates a new nodetype writer that does not include namespaces.CompactNodeTypeDefWriter(Writer out, NamespaceResolver r, NamePathResolver npResolver, boolean includeNS)
Creates a new nodetype writer
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(Collection<? extends QNodeTypeDefinition> defs)
Write a collection of QNodeTypeDefinitions to this writerstatic void
write(Collection<? extends QNodeTypeDefinition> defs, NamespaceResolver r, NamePathResolver npResolver, Writer out)
Writes the given list of QNodeTypeDefinition to the output writer including the used namespaces.void
write(QNodeTypeDefinition ntd)
Write one QNodeTypeDefinition to this writer-
Methods inherited from class org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefWriter
close, write, write, write, writeNamespaceDeclaration
-
-
-
-
Constructor Detail
-
CompactNodeTypeDefWriter
public CompactNodeTypeDefWriter(Writer out, Session s, boolean includeNS)
Creates a new nodetype writer based on a session- Parameters:
out
- the underlying writers
- repository sessionincludeNS
- iftrue
all used namespace declarations are also written to the writer
-
CompactNodeTypeDefWriter
public CompactNodeTypeDefWriter(Writer out, NamespaceResolver r, boolean includeNS)
Creates a new nodetype writer based on a namespace resolver- Parameters:
out
- the underlying writerr
- the namespace resolverincludeNS
- iftrue
all used namespace decl. are also written to the writer
-
CompactNodeTypeDefWriter
public CompactNodeTypeDefWriter(Writer out, NamespaceResolver r, NamePathResolver npResolver)
Creates a new nodetype writer that does not include namespaces.- Parameters:
out
- the underlying writerr
- the namespace resolvernpResolver
- name-path resolver
-
CompactNodeTypeDefWriter
public CompactNodeTypeDefWriter(Writer out, NamespaceResolver r, NamePathResolver npResolver, boolean includeNS)
Creates a new nodetype writer- Parameters:
out
- the underlying writerr
- the namespace resolvernpResolver
- name-path resolverincludeNS
- iftrue
all used namespace decl. are also written to the writer
-
-
Method Detail
-
write
public static void write(Collection<? extends QNodeTypeDefinition> defs, NamespaceResolver r, NamePathResolver npResolver, Writer out) throws IOException
Writes the given list of QNodeTypeDefinition to the output writer including the used namespaces.- Parameters:
defs
- collection of definitionsr
- namespace resolvernpResolver
- name-path resolverout
- output writer- Throws:
IOException
- if an I/O error occurs
-
write
public void write(QNodeTypeDefinition ntd) throws IOException
Write one QNodeTypeDefinition to this writer- Parameters:
ntd
- node type definition- Throws:
IOException
- if an I/O error occurs
-
write
public void write(Collection<? extends QNodeTypeDefinition> defs) throws IOException
Write a collection of QNodeTypeDefinitions to this writer- Parameters:
defs
- node type definitions- Throws:
IOException
- if an I/O error occurs
-
-