org.apache.jackrabbit.spi.commons.nodetype.compact
Class CompactNodeTypeDefWriter

java.lang.Object
  extended by org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefWriter
      extended by org.apache.jackrabbit.spi.commons.nodetype.compact.CompactNodeTypeDefWriter

public class CompactNodeTypeDefWriter
extends CompactNodeTypeDefWriter

Prints node type defs in a compact notation Print Format: [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
CompactNodeTypeDefWriter(Writer out, NamespaceResolver r, boolean includeNS)
          Creates a new nodetype writer based on a namespace resolver
CompactNodeTypeDefWriter(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
CompactNodeTypeDefWriter(Writer out, Session s, boolean includeNS)
          Creates a new nodetype writer based on a session
 
Method Summary
 void write(Collection<? extends QNodeTypeDefinition> defs)
          Write a collection of QNodeTypeDefinitions to this writer
static 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompactNodeTypeDefWriter

public CompactNodeTypeDefWriter(Writer out,
                                Session s,
                                boolean includeNS)
Creates a new nodetype writer based on a session

Parameters:
out - the underlying writer
s - repository session
includeNS - if true 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 writer
r - the namespace resolver
includeNS - if true 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 writer
r - the namespace resolver
npResolver - name-path resolver

CompactNodeTypeDefWriter

public CompactNodeTypeDefWriter(Writer out,
                                NamespaceResolver r,
                                NamePathResolver npResolver,
                                boolean includeNS)
Creates a new nodetype writer

Parameters:
out - the underlying writer
r - the namespace resolver
npResolver - name-path resolver
includeNS - if true 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 definitions
r - namespace resolver
npResolver - name-path resolver
out - 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


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.