public class XmlInputTransformer extends Object implements InputTransformer, Describable
InputTransformer that can be configured to parse any XML into a Metacard It is
configured through setSaxEventHandlerConfiguration(List) and XmlInputTransformer#getMetacardType() | Constructor and Description |
|---|
XmlInputTransformer() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Returns a description of the describable item.
|
String |
getId()
Returns the name, aka ID, of the describable item.
|
String |
getOrganization()
Returns the organization associated with the describable item.
|
String |
getTitle()
Returns the title of the describable item.
|
String |
getVersion()
Retrieve the version.
|
void |
setDescription(String description) |
void |
setId(String id) |
void |
setOrganization(String organization) |
void |
setSaxEventHandlerConfiguration(List<String> saxEventHandlerConfiguration)
Setter to set the configuration of SaxEventHandlers used to parse metacards
|
void |
setSaxEventHandlerFactories(List<SaxEventHandlerFactory> saxEventHandlerFactories)
Setter to set the list of all
SaxEventHandlerFactorys. |
void |
setTitle(String title) |
void |
setVersion(String version) |
Metacard |
transform(InputStream inputStream)
Takes in an XML
InputStream and returns a populated Metacard The Metacard is
populated with all attributes that have been parsed by the SaxEventHandlers declared in
saxEventHandlerConfigurations |
Metacard |
transform(InputStream inputStream,
String id)
Takes in an XML
InputStream and an ID and returns a populated Metacard The
Metacard is populated with all attributes that have been parsed by the SaxEventHandlers
declared in saxEventHandlerConfigurations and with the specific ID |
public Metacard transform(InputStream inputStream) throws CatalogTransformerException
InputStream and returns a populated Metacard The Metacard is
populated with all attributes that have been parsed by the SaxEventHandlers declared in
saxEventHandlerConfigurationstransform in interface InputTransformerinputStream - an XML input stream to be turned into a MetacardCatalogTransformerExceptionIOExceptionpublic Metacard transform(InputStream inputStream, String id) throws CatalogTransformerException, IOException
InputStream and an ID and returns a populated Metacard The
Metacard is populated with all attributes that have been parsed by the SaxEventHandlers
declared in saxEventHandlerConfigurations and with the specific IDtransform in interface InputTransformerinputStream - an XML input stream to be turned into a Metacard.id - the attribute value for the Metacard.ID attribute that should be set in the
generated MetacardCatalogTransformerExceptionIOExceptionpublic void setSaxEventHandlerFactories(List<SaxEventHandlerFactory> saxEventHandlerFactories)
SaxEventHandlerFactorys. Usually called from a blueprint,
and the blueprint will keep the factories updatedsaxEventHandlerFactories - a list of all SaxEventHandlerFactories (usually a list of all
factories that are available as services)public void setSaxEventHandlerConfiguration(List<String> saxEventHandlerConfiguration)
saxEventHandlerConfiguration - a list of SaxEventHandlerFactory idspublic String getVersion()
DescribablegetVersion in interface Describablepublic String getId()
Describablehtml for a MetacardTransformer that transforms Metacards to HTMLgetId in interface Describablepublic String getTitle()
DescribablegetTitle in interface Describablepublic String getDescription()
DescribablegetDescription in interface Describablepublic String getOrganization()
DescribablegetOrganization in interface Describablepublic void setVersion(String version)
public void setId(String id)
public void setTitle(String title)
public void setDescription(String description)
public void setOrganization(String organization)
This work is licensed under a Creative Commons Attribution 4.0 International License.