Overview | Package | Class | Tree | Deprecated | Index | Help
| XCC/J 4.2-9
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package com.marklogic.xcc.examples

XCC Examples.

See:
Description

Class Summary
ContentFetcher | This class fetches documents from the conentbase and writes their serialized contents to a provided `OutputStream`.
ContentLoader | This program accepts a server URI (in the format expected by `ContentSourceFactory.newContentSource(java.net.URI)`) and one or more file pathnames of documents to load.
DynamicContentStream | This class, which extends `InputStream`, is an example of producing dynamic, on-the-fly content that can be used with `ContentFactory.newUnBufferedContent(String, java.io.InputStream, com.marklogic.xcc.ContentCreateOptions)` .
HelloSecureWorld | A version of the Hello World example that connects to a server using SSL/TLS.
HelloWorld | The obligatory Hello World example.
ModuleRunner | This is a very simple class that will invoke a named XQuery module on the server and return the result.
OutputStreamContent | This is a specialized implementation of the `Content` interface which allows you to write your content to an `OutputStream`.
OutputStreamInserter | This class illustrates a sample usage of the `OutputStreamContent` class.
OutputStreamInserter.DocBuilder | A simple dummy content generator which writes to an `OutputStream`.
QueryHelper | This is a staitc helper class with some common code routines used by the examples in this package.
SemiBufferedContent | This is a specialized `Content` implementation that takes an `InputStream` and will either buffer the content of the stream if it's small enough, or copy the content to a temporary disk file otherwise.
SimpleQueryRunner | This is a very simple class that will submit an XQuery string to the server and return the result.

## Package com.marklogic.xcc.examples Description

### XCC Examples.

This package contains sample code to illustrate various usages of XCC/J.

The source code for these sample classes is bundled with the Javadocs. The Javadoc page for each class has a link to the source. The links are also included below for convenience.

- `HelloWorld`
- `SimpleQueryRunner`
- `ModuleRunner`
- `ContentLoader`
- `ContentFetcher`
- `QueryHelper`

These classes illustrate how to insert content that needs to be transformed on the fly or otherwise dynamically generated. If possible, it's preferrable to write your content to a file and pass a `File` object to `ContentFactory`.

- `OutputStreamContent`
- `OutputStreamInserter`
- `DynamicContentStream`
- `SemiBufferedContent`

Although these classes are listed here in the Javadocs, compiled classes are not included in standard XCC jar file. Source code and compiled classes for these examples are included separately in the distribution zip file.

Overview | Package | Class | Tree | Deprecated | Index | Help
| XCC/J 4.2-9
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

Copyright © 2003-2012 MarkLogic Corporation, All Rights Reserved.

Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com