Package org.apache.ivy.osgi.core
Class OSGiManifestParser
- java.lang.Object
-
- org.apache.ivy.osgi.core.OSGiManifestParser
-
- All Implemented Interfaces:
ModuleDescriptorParser
public class OSGiManifestParser extends java.lang.Object implements ModuleDescriptorParser
-
-
Constructor Summary
Constructors Constructor Description OSGiManifestParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(Resource res)voidadd(ExecutionEnvironmentProfileProvider pp)static OSGiManifestParsergetInstance()ArtifactgetMetadataArtifact(ModuleRevisionId mrid, Resource res)Returns the module metadata artifact corresponding to the given module revision id that this parser parsesjava.lang.StringgetType()Return the 'type' of module artifacts this parser is parsingModuleDescriptorparseDescriptor(ParserSettings ivySettings, java.net.URL descriptorURL, boolean validate)ModuleDescriptorparseDescriptor(ParserSettings ivySettings, java.net.URL descriptorURL, Resource res, boolean validate)voidtoIvyFile(java.io.InputStream is, Resource res, java.io.File destFile, ModuleDescriptor md)Convert a module descriptor to an ivy file.java.lang.StringtoString()
-
-
-
Method Detail
-
getInstance
public static OSGiManifestParser getInstance()
-
add
public void add(ExecutionEnvironmentProfileProvider pp)
-
accept
public boolean accept(Resource res)
- Specified by:
acceptin interfaceModuleDescriptorParser
-
parseDescriptor
public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, java.net.URL descriptorURL, Resource res, boolean validate) throws java.text.ParseException, java.io.IOException
- Specified by:
parseDescriptorin interfaceModuleDescriptorParser- Throws:
java.text.ParseExceptionjava.io.IOException
-
toIvyFile
public void toIvyFile(java.io.InputStream is, Resource res, java.io.File destFile, ModuleDescriptor md) throws java.text.ParseException, java.io.IOExceptionDescription copied from interface:ModuleDescriptorParserConvert a module descriptor to an ivy file. This method MUST close the given input stream when job is finished- Specified by:
toIvyFilein interfaceModuleDescriptorParser- Parameters:
is- input stream with opened on original module descriptor resourceres- ResourcedestFile- Filemd- ModuleDescriptor- Throws:
java.text.ParseException- if something goes wrongjava.io.IOException- if something goes wrong
-
parseDescriptor
public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, java.net.URL descriptorURL, boolean validate) throws java.text.ParseException, java.io.IOException
- Specified by:
parseDescriptorin interfaceModuleDescriptorParser- Throws:
java.text.ParseExceptionjava.io.IOException
-
getType
public java.lang.String getType()
Description copied from interface:ModuleDescriptorParserReturn the 'type' of module artifacts this parser is parsing- Specified by:
getTypein interfaceModuleDescriptorParser- Returns:
- the 'type' of module artifacts this parser is parsing
-
getMetadataArtifact
public Artifact getMetadataArtifact(ModuleRevisionId mrid, Resource res)
Description copied from interface:ModuleDescriptorParserReturns the module metadata artifact corresponding to the given module revision id that this parser parses- Specified by:
getMetadataArtifactin interfaceModuleDescriptorParser- Parameters:
mrid- the module revision id for which the module artifact should be returnedres- the resource for which the module artifact should be returned- Returns:
- the module artifact corresponding to the given mrid and resource
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-