Content Pipeline Guide > Content Pipelines > Composer Configuration Files > Creating a Simple CCF File > Resource element
  
Resource element
The Resource element defines filters and their properties. This includes filter and adapter class names, and all parameters that the filter expects. Filter definitions contain parameter definitions for every parameter that the filter adapter accepts. After you define a filter using the FilterDef element, the Pipeline element can reference the filter.
<Resource>
<FilterDef id="epicGenerator" type="source"
adapterClass=
"com.arbortext.epic.saxfilter.DefaultFilterAdapter"
filterClass=
"com.arbortext.epic.saxfilter.EpicGenerator">
<Parameter id="epicGenerator.docId" name="docId"
required="yes"></Parameter>
</FilterDef>
An associated adapter constructs, initializes, and controls the filter. In the following example, the adapterClass attribute specifies com.arbortext.epic.saxfilter.DefaultFilterAdapter as the adapter’s qualified class. The optional filterClass attribute specifies com.arbortext.epic.saxfilter.FileSerializer as the filter's package qualified class. The adapter's constructor uses this value as its argument. If you omit the filterClass attribute, the adapter constructor has no arguments.
<FilterDef id="fileSerializer" type="sink"
adapterClass="com.arbortext.epic.saxfilter.DefaultFilterAdapter"
filterClass="com.arbortext.epic.saxfilter.FileSerializer">
<Parameter id="fileSerializer.outputFile"
name="outputFile"></Parameter>
</FilterDef>
A filter can implement the adapter interface. In this situation, the adapter class is the same as the filter, so you can safely omit the filter class.
The type attribute defines the type of filter: source, transformer, or sink.
A sink cannot have any Output elements.
A source does not have to implement the SAX2 interfaces, but it must implement the runFilter method.
A transformer must have Input and Output elements.
Pipes connect the filters in a pipeline. A filter that generates SAX events may direct these events to one or more pipes using the Output element. Each Output element within a FilterDef must have a distinct pipeName attribute. If you omit an Output element, the default pipe is used. If a filter doesn't declare an output, then it is a sink filter, and cannot come before any other filter in the pipeline.