|
Content Assembler API 2.1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.endeca.content.assembler.ContentAssembler
public class ContentAssembler
Used to transform a ContentResource
into an object model
representation of its content item.
Evaluation of a tag is accomplished by delegating to the
evaluate
method of the TagHandler
which is
registered for that tag. These handlers may simply transform the XML
into objects, or they may execute additional queries or invoke the
evaluate
method of the
ContentAssembler
on child tags.
ContentItem
Constructor Summary | |
---|---|
ContentAssembler(boolean pValidating)
Constructs a new ContentAssembler . |
Method Summary | |
---|---|
ContentItem |
assemble(ContentContext pContentContext,
ContentResource pContentResource)
Assembles a ContentResource into a ContentItem . |
java.lang.Object |
evaluate(ContentContext pContentContext,
org.w3c.dom.Element pElement)
Finds the appropriate TagHandler , invokes its
evaluate method, and returns the result. |
void |
setDocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory pDocumentBuilderFactory)
Overrides the default DocumentBuilderFactory
used when parsing content. |
void |
setValidating(boolean pValidating)
Specifies whether XML validation should be enabled when parsing content. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentAssembler(boolean pValidating) throws InitializationException
ContentAssembler
.
pValidating
- Whether schema validation should be performed on
the content XML. This feature is only available on Java 1.5 and newer.
InitializationException
- If an error occurred while creating the
assembler.Method Detail |
---|
public ContentItem assemble(ContentContext pContentContext, ContentResource pContentResource) throws ContentException
ContentResource
into a ContentItem
.
pContentContext
- The context within which the resource is
being assembledpContentResource
- The resource to assemble
ContentException
- If an error occurred during assembly.public java.lang.Object evaluate(ContentContext pContentContext, org.w3c.dom.Element pElement) throws ContentException
TagHandler
, invokes its
evaluate
method, and returns the result.
pContentContext
- The context within which the element is
being evaluatedpElement
- The XML element to evaluate
TagHandler
.
ContentException
- If an error occurred during evaluation.TagHandler.evaluate(ContentContext, Element)
public void setValidating(boolean pValidating) throws InitializationException
Enabling XML validation requires XML schema compilation features that were made available in Java 1.5.
It is important to note that this method will replace any prior
changes specified via the
setDocumentBuilderFactory
method with a default factory.
pValidating
- Specifies whether XML validation should be enabled
InitializationException
- If an error occurred while enabling
XML validation.public void setDocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory pDocumentBuilderFactory) throws InitializationException
DocumentBuilderFactory
used when parsing content.
To work properly, factories specified via this method must be namespace aware.
pDocumentBuilderFactory
- The DocumentBuilderFactory
to use
InitializationException
- If an error occurred while setting
the factory.
|
Content Assembler API 2.1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@VERSION PRODUCT: Content Assembler API (ContentAssemblerAPIJava) VERSION: 2.1.2 BUILD: 54DEV ARCH_OS: n/a DATE: 2012-02-16T20:28:44-0500