com.smartbear.swagger4j.impl
Class SwaggerWriterImpl

java.lang.Object
  extended by com.smartbear.swagger4j.impl.SwaggerWriterImpl
All Implemented Interfaces:
SwaggerWriter

public class SwaggerWriterImpl
extends Object
implements SwaggerWriter

Default implementation of the SwaggerWriter interface

See Also:
SwaggerWriter

Constructor Summary
SwaggerWriterImpl(Constants.Format format)
           
 
Method Summary
 Constants.Format getFormat()
          Gets the format of this SwaggerWriter
 void writeApiDeclaration(ApiDeclaration declaration, Writer writer)
          Writes the specified ApiDeclaration to the specified Writer in the configured format
 void writeResourceListing(ResourceListing listing, Writer writer)
          Writes the specified ResourceListing to the specified Writer in the configured format
 void writeSwagger(SwaggerStore store, ResourceListing resourceListing)
          Writes an entire Swagger definition (both ResourceListing and referred ApiDeclarations) to a generic SwaggerStore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwaggerWriterImpl

public SwaggerWriterImpl(Constants.Format format)
Method Detail

writeApiDeclaration

public void writeApiDeclaration(ApiDeclaration declaration,
                                Writer writer)
                         throws IOException
Description copied from interface: SwaggerWriter
Writes the specified ApiDeclaration to the specified Writer in the configured format

Specified by:
writeApiDeclaration in interface SwaggerWriter
Parameters:
declaration - the declaration to write
writer - the writer to write to
Throws:
IOException

writeResourceListing

public void writeResourceListing(ResourceListing listing,
                                 Writer writer)
                          throws IOException
Description copied from interface: SwaggerWriter
Writes the specified ResourceListing to the specified Writer in the configured format

Specified by:
writeResourceListing in interface SwaggerWriter
Parameters:
listing - the listing to write
writer - the writer to write to
Throws:
IOException

getFormat

public Constants.Format getFormat()
Description copied from interface: SwaggerWriter
Gets the format of this SwaggerWriter

Specified by:
getFormat in interface SwaggerWriter
Returns:
the format used by this writer when writing Swagger definitions

writeSwagger

public void writeSwagger(SwaggerStore store,
                         ResourceListing resourceListing)
                  throws IOException
Description copied from interface: SwaggerWriter
Writes an entire Swagger definition (both ResourceListing and referred ApiDeclarations) to a generic SwaggerStore

Specified by:
writeSwagger in interface SwaggerWriter
Parameters:
store - the SwaggerStore to write to
resourceListing - the ResourceListing to write
Throws:
IOException


Copyright © 2013. All Rights Reserved.