public class ComponentDescriptorIO extends Object
ComponentDescriptorIO
is a helper class to read and write component descriptor files.| Modifier and Type | Class and Description |
|---|---|
protected static class |
ComponentDescriptorIO.XmlHandler
A content handler for parsing the component descriptions.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
INNER_NAMESPACE_URI
The inner namespace - used for all inner elements.
|
| Constructor and Description |
|---|
ComponentDescriptorIO() |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
generateDescriptorFiles(DescriptionContainer module,
Options options,
Log logger)
Generate descriptor file(s)
|
protected static void |
generateImplementationXML(ComponentContainer component,
ContentHandler contentHandler)
Write the xml for an Implementation.
|
protected static void |
generatePropertyXML(PropertyDescription property,
ContentHandler contentHandler)
Write the xml for a property.
|
protected static void |
generateReferenceXML(ComponentDescription component,
DescriptionContainer module,
ReferenceDescription reference,
ContentHandler contentHandler)
Write the xml for a Reference.
|
protected static void |
generateServiceXML(ServiceDescription service,
ContentHandler contentHandler)
Write the xml for a service.
|
protected static void |
generateXML(DescriptionContainer module,
List<ComponentContainer> components,
File descriptorFile,
Log logger)
Generate the xml top level element and start streaming
the components.
|
protected static void |
generateXML(String namespace,
DescriptionContainer module,
ComponentContainer container,
ContentHandler contentHandler)
Write the xml for a Component
|
static List<ClassDescription> |
read(InputStream file,
ClassLoader classLoader,
IssueLog iLog,
String location) |
public static final String INNER_NAMESPACE_URI
public static List<ClassDescription> read(InputStream file, ClassLoader classLoader, IssueLog iLog, String location) throws SCRDescriptorException
SCRDescriptorExceptionprotected static void generateXML(DescriptionContainer module, List<ComponentContainer> components, File descriptorFile, Log logger) throws SAXException, IOException, TransformerException
components - contentHandler - SAXExceptionIOExceptionTransformerExceptionprotected static void generateXML(String namespace, DescriptionContainer module, ComponentContainer container, ContentHandler contentHandler) throws SAXException
component - contentHandler - SAXExceptionprotected static void generateImplementationXML(ComponentContainer component, ContentHandler contentHandler) throws SAXException
implementation - contentHandler - SAXExceptionprotected static void generateServiceXML(ServiceDescription service, ContentHandler contentHandler) throws SAXException
service - contentHandler - SAXExceptionprotected static void generatePropertyXML(PropertyDescription property, ContentHandler contentHandler) throws SAXException
property - contentHandler - SAXExceptionprotected static void generateReferenceXML(ComponentDescription component, DescriptionContainer module, ReferenceDescription reference, ContentHandler contentHandler) throws SAXException
reference - contentHandler - SAXExceptionpublic static List<String> generateDescriptorFiles(DescriptionContainer module, Options options, Log logger) throws SCRDescriptorException, SCRDescriptorFailureException
Copyright © 2006–2015 The Apache Software Foundation. All rights reserved.