org.apache.felix.ipojo.manipulator
Class Pojoization

java.lang.Object
  extended by org.apache.felix.ipojo.manipulator.Pojoization

public class Pojoization
extends Object

Pojoization allows creating an iPOJO bundle from a "normal" bundle.

Author:
Felix Project Team

Field Summary
static String IPOJO_PACKAGE_VERSION
          iPOJO Imported Package Version.
 
Constructor Summary
Pojoization()
           
 
Method Summary
 List getErrors()
           
 List getWarnings()
           
 Map parseHeader(String value)
          Standard OSGi header parser.
 void pojoization(File in, File out, File metadataFile)
          Manipulates an input bundle.
 void pojoization(File in, File out, InputStream metadata)
          Manipulates an input bundle.
 String printClauses(Map exports, String allowedDirectives)
          Print a standard Map based OSGi header.
 void setAnnotationProcessing()
          Activates annotation processing.
 void setUseLocalXSD()
          Activates the entity resolver loading XSD files from the classloader.
 void warn(String mes)
          Add a warning in the warning list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IPOJO_PACKAGE_VERSION

public static final String IPOJO_PACKAGE_VERSION
iPOJO Imported Package Version.

See Also:
Constant Field Values
Constructor Detail

Pojoization

public Pojoization()
Method Detail

warn

public void warn(String mes)
Add a warning in the warning list.

Parameters:
mes - : warning message

getErrors

public List getErrors()

setAnnotationProcessing

public void setAnnotationProcessing()
Activates annotation processing.


setUseLocalXSD

public void setUseLocalXSD()
Activates the entity resolver loading XSD files from the classloader.


pojoization

public void pojoization(File in,
                        File out,
                        InputStream metadata)
Manipulates an input bundle. This method creates an iPOJO bundle based on the given metadata file. The original and final bundles must be different.

Parameters:
in - the original bundle.
out - the final bundle.
metadata - the iPOJO metadata input stream.

pojoization

public void pojoization(File in,
                        File out,
                        File metadataFile)
Manipulates an input bundle. This method creates an iPOJO bundle based on the given metadata file. The original and final bundles must be different.

Parameters:
in - the original bundle.
out - the final bundle.
metadataFile - the iPOJO metadata file (XML).

parseHeader

public Map parseHeader(String value)
Standard OSGi header parser. This parser can handle the format clauses ::= clause ( ',' clause ) + clause ::= name ( ';' name ) (';' key '=' value ) This is mapped to a Map { name => Map { attr|directive => value } }

Parameters:
value - : String to parse.
Returns:
parsed map.

printClauses

public String printClauses(Map exports,
                           String allowedDirectives)
Print a standard Map based OSGi header.

Parameters:
exports - : map { name => Map { attribute|directive => value } }
allowedDirectives - : list of allowed directives.
Returns:
the clauses

getWarnings

public List getWarnings()


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