Class Metadata

java.lang.Object
org.glassfish.spec.Metadata

public final class Metadata extends Object
Represents an API JAR MANIFEST.MF entries.
  • Field Details

    • bundleSymbolicName

      private String bundleSymbolicName
      Bundle Symbolic Name.
    • bundleSpecVersion

      private String bundleSpecVersion
      Bundle Spec Version.
    • bundleVersion

      private String bundleVersion
      Bundle Version.
    • jarExtensionName

      private String jarExtensionName
      Jar Extension Name.
    • jarSpecificationVersion

      private String jarSpecificationVersion
      Jar Specification Version.
    • jarImplementationVersion

      private String jarImplementationVersion
      Jar Implementation Version.
    • properties

      private Properties properties
      Properties.
    • BUNDLE_SYMBOLIC_NAME

      public static final String BUNDLE_SYMBOLIC_NAME
      Entry name for Bundle Symbolic Name.
      See Also:
    • BUNDLE_SPEC_VERSION

      public static final String BUNDLE_SPEC_VERSION
      Entry name for Bundle Spec Version.
      See Also:
    • BUNDLE_VERSION

      public static final String BUNDLE_VERSION
      Entry name for Bundle Version.
      See Also:
    • JAR_EXTENSION_NAME

      public static final String JAR_EXTENSION_NAME
      Entry name for Jar Extension Name.
      See Also:
    • JAR_SPECIFICATION_VERSION

      public static final String JAR_SPECIFICATION_VERSION
      Entry name for Jar Specification Version.
      See Also:
    • JAR_IMPLEMENTATION_VERSION

      public static final String JAR_IMPLEMENTATION_VERSION
      Entry name for Jar Implementation Version.
      See Also:
    • errors

      private final List<String> errors
      List of collected errors.
    • KEYS

      private static final String[] KEYS
      All the metadata entry names.
  • Constructor Details

    • Metadata

      Metadata(String bsn, String bsv, String bv, String jen, String jsv, String jiv, List<String> errs)
      Create a new Metadata instance.
      Parameters:
      bsn - bundle symbolic name
      bsv - bundle spec version
      bv - bundle version
      jen - jar extension name
      jsv - jar spec version
      jiv - jar implementation version
      errs - errors
    • Metadata

      Metadata(String bsn, String bsv, String bv, String jen, String jsv, String jiv)
      Create a new Metadata instance.
      Parameters:
      bsn - bundle symbolic name
      bsv - bundle spec version
      bv - bundle version
      jen - jar extension name
      jsv - jar spec version
      jiv - jar implementation version
  • Method Details

    • fromJar

      public static Metadata fromJar(JarFile jar) throws IOException
      Create a new Metadata instance from a JAR file.
      Parameters:
      jar - the JAR file to process
      Returns:
      the created Metadata instance
      Throws:
      IOException - if an error occurs while reading JAR entries
    • getBundleSymbolicName

      public String getBundleSymbolicName()
      Get the bundle symbolic name entry.
      Returns:
      bundle symbolic name
    • getBundleSpecVersion

      public String getBundleSpecVersion()
      Get the bundle spec version entry.
      Returns:
      bundle spec version
    • getBundleVersion

      public String getBundleVersion()
      Get the bundle version entry.
      Returns:
      bundle version
    • getJarExtensionName

      public String getJarExtensionName()
      Get the jar extension name entry.
      Returns:
      jar extension name
    • getJarSpecificationVersion

      public String getJarSpecificationVersion()
      Get the jar specification version entry.
      Returns:
      jar specification version
    • getjarImplementationVersion

      public String getjarImplementationVersion()
      Get the jar implementation version entry.
      Returns:
      jar implementation version
    • getProperties

      public Properties getProperties()
      Get the metadata properties.
      Returns:
      metadata properties
    • getErrors

      public List<String> getErrors()
      Get the metadata errors.
      Returns:
      the list of errors