|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
net.shibboleth.metadata.pipeline.BaseStage<DomElementItem>
net.shibboleth.metadata.dom.ElementFormattingStage
public class ElementFormattingStage
A stage that formats a collection of DOM Elements.
Note, this stage uses Xalan so Xalan must be included on the classpath. However, Xalan does not have
to be the system default TransformerFactory implementation.
| Field Summary | |
|---|---|
private List<String> |
cdataSectionElements
List of elements whose content should be wrapped in CDATA sections. |
private boolean |
indented
Whether to indent elements. |
private int |
indentSize
Number of spaces used to indent elements. |
private String |
lineSeparator
Line separator character to use. |
private TransformerFactory |
transformerFactory
The factory used to create the Transformer used to format the elements. |
| Constructor Summary | |
|---|---|
ElementFormattingStage()
|
|
| Method Summary | |
|---|---|
protected void |
doExecute(Collection<DomElementItem> itemCollection)
Performs the stage processing on the given Item collection. |
protected void |
doInitialize()
|
List<String> |
getCdataSectionElements()
Gets the list of elements whose content should be wrapped in CDATA sections. |
int |
getIndentSize()
Gets the number of spaces to use when indenting elements. |
String |
getLineSeparator()
Gets the line separator character to use. |
protected Transformer |
getTransformer()
Builds the Transformer that will be used to format the element. |
boolean |
isIndented()
Gets whether to indent elements. |
void |
setCdataSectionElements(List<String> elements)
Sets the list of elements whose content should be wrapped in CDATA sections. |
void |
setIndented(boolean indentElements)
Sets whether to indent elements. |
void |
setIndentSize(int size)
Sets the number of spaces to use when indenting elements. |
void |
setLineSeparator(String separator)
Sets the line separator character to use. |
| Methods inherited from class net.shibboleth.metadata.pipeline.BaseStage |
|---|
execute, setId |
| Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent |
|---|
getId |
| Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent |
|---|
destroy, doDestroy, initialize, isDestroyed, isInitialized |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent |
|---|
destroy, isDestroyed |
| Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiableComponent |
|---|
getId |
| Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent |
|---|
initialize, isInitialized |
| Field Detail |
|---|
private String lineSeparator
private boolean indented
private int indentSize
private List<String> cdataSectionElements
private TransformerFactory transformerFactory
Transformer used to format the elements.
| Constructor Detail |
|---|
public ElementFormattingStage()
| Method Detail |
|---|
@Nonnull public String getLineSeparator()
public void setLineSeparator(@Nullable
String separator)
separator - line separator character to usepublic boolean isIndented()
public void setIndented(boolean indentElements)
indentElements - whether to indent elementspublic int getIndentSize()
public void setIndentSize(int size)
size - number of spaces to use when indenting elements, must be 0 or greater@Nonnull @NonnullElements @Unmodifiable public List<String> getCdataSectionElements()
Elements are specified either by their local name, if they are not in a namespace, or via the form '{' + namespace URI + '}' + local name if they are in a namespace.
public void setCdataSectionElements(@Nullable@NullableElements
List<String> elements)
elements - list of elements whose content should be wrapped in CDATA sections
protected void doExecute(Collection<DomElementItem> itemCollection)
throws StageProcessingException
The stage is guaranteed to be have been initialized and not destroyed when this is invoked.
doExecute in class BaseStage<DomElementItem>itemCollection - collection to be processed
StageProcessingException - thrown if there is an unrecoverable problem when processing the stage
protected Transformer getTransformer()
throws StageProcessingException
Transformer that will be used to format the element.
Transformer that will be used to format the element
StageProcessingException - thrown if the configuration of the TransformerFactory has become
corrupted since stage initialization
protected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||