org.apache.felix.scrplugin.xml
Class ComponentDescriptorIO

java.lang.Object
  extended by org.apache.felix.scrplugin.xml.ComponentDescriptorIO

public class ComponentDescriptorIO
extends java.lang.Object

ComponentDescriptorIO is a helper class to read and write component descriptor files.


Nested Class Summary
protected static class ComponentDescriptorIO.XmlHandler
          A content handler for parsing the component descriptions.
 
Field Summary
static java.lang.String INNER_NAMESPACE_URI
           
static java.lang.String NAMESPACE_URI
           
 
Constructor Summary
ComponentDescriptorIO()
           
 
Method Summary
protected static void generateXML(Component component, org.xml.sax.ContentHandler contentHandler, boolean isScrPrivateFile)
          Write the xml for a Component.
protected static void generateXML(Components components, org.xml.sax.ContentHandler contentHandler, boolean isScrPrivateFile)
          Generate the xml top level element and start streaming the components.
protected static void generateXML(Implementation implementation, org.xml.sax.ContentHandler contentHandler)
          Write the xml for a Implementation.
protected static void generateXML(Interface interf, org.xml.sax.ContentHandler contentHandler)
          Write the xml for a Interface.
protected static void generateXML(Property property, org.xml.sax.ContentHandler contentHandler, boolean isScrPrivateFile)
          Write the xml for a Property.
protected static void generateXML(Reference reference, org.xml.sax.ContentHandler contentHandler, boolean isScrPrivateFile)
          Write the xml for a Reference.
protected static void generateXML(Service service, org.xml.sax.ContentHandler contentHandler)
          Write the xml for a Service.
static Components read(java.io.File file)
           
static void write(Components components, java.io.File file, boolean isScrPrivateFile)
          Write the component descriptors to the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE_URI

public static final java.lang.String NAMESPACE_URI
See Also:
Constant Field Values

INNER_NAMESPACE_URI

public static final java.lang.String INNER_NAMESPACE_URI
See Also:
Constant Field Values
Constructor Detail

ComponentDescriptorIO

public ComponentDescriptorIO()
Method Detail

read

public static Components read(java.io.File file)
                       throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

write

public static void write(Components components,
                         java.io.File file,
                         boolean isScrPrivateFile)
                  throws org.apache.maven.plugin.MojoExecutionException
Write the component descriptors to the file.

Parameters:
components -
file -
Throws:
org.apache.maven.plugin.MojoExecutionException

generateXML

protected static void generateXML(Components components,
                                  org.xml.sax.ContentHandler contentHandler,
                                  boolean isScrPrivateFile)
                           throws org.xml.sax.SAXException
Generate the xml top level element and start streaming the components.

Parameters:
components -
contentHandler -
Throws:
org.xml.sax.SAXException

generateXML

protected static void generateXML(Component component,
                                  org.xml.sax.ContentHandler contentHandler,
                                  boolean isScrPrivateFile)
                           throws org.xml.sax.SAXException
Write the xml for a Component.

Parameters:
component -
contentHandler -
Throws:
org.xml.sax.SAXException

generateXML

protected static void generateXML(Implementation implementation,
                                  org.xml.sax.ContentHandler contentHandler)
                           throws org.xml.sax.SAXException
Write the xml for a Implementation.

Parameters:
implementation -
contentHandler -
Throws:
org.xml.sax.SAXException

generateXML

protected static void generateXML(Service service,
                                  org.xml.sax.ContentHandler contentHandler)
                           throws org.xml.sax.SAXException
Write the xml for a Service.

Parameters:
service -
contentHandler -
Throws:
org.xml.sax.SAXException

generateXML

protected static void generateXML(Interface interf,
                                  org.xml.sax.ContentHandler contentHandler)
                           throws org.xml.sax.SAXException
Write the xml for a Interface.

Parameters:
interf -
contentHandler -
Throws:
org.xml.sax.SAXException

generateXML

protected static void generateXML(Property property,
                                  org.xml.sax.ContentHandler contentHandler,
                                  boolean isScrPrivateFile)
                           throws org.xml.sax.SAXException
Write the xml for a Property.

Parameters:
property -
contentHandler -
Throws:
org.xml.sax.SAXException

generateXML

protected static void generateXML(Reference reference,
                                  org.xml.sax.ContentHandler contentHandler,
                                  boolean isScrPrivateFile)
                           throws org.xml.sax.SAXException
Write the xml for a Reference.

Parameters:
reference -
contentHandler -
Throws:
org.xml.sax.SAXException


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.