Class BomParserImpl

    • Constructor Detail

      • BomParserImpl

        public BomParserImpl()
    • Method Detail

      • extractLgplMaterials

        public List<Material> extractLgplMaterials​(String bomContents)
        Description copied from interface: BomParser
        Extracts LGPL information from a String.

        The String should be csv formatted and may contain multiple lines. Each line should contain exactly 5 elements, separated by commas. Lines beginning with # should be treated as comments. Only lines containing the text GNU Lesser General Public License will be considered.

        For example:

        • amf-serializer,com.exadel.flamingo.flex:amf-serializer:jar:2.2.0,GNU Lesser General Public License 2.1,,binary

          accepted

        • #amf-serializer,com.exadel.flamingo.flex:amf-serializer:jar:2.2.0,GNU Lesser General Public License 2.1,,binary

          ignored as a comment

        • Abdera Core,org.apache.abdera:abdera-core:bundle:1.1,Apache License 2.0,http://abdera.apache.org/abdera-core,binary

          ignored

          as a non-LGPL license
        • amf-serializer,com.exadel.flamingo.flex:amf-serializer:jar:2.2.0,LGPL 2.1,,binary

          ignored as a non-LGPL license

        • ,,GNU Lesser General Public License 2.1,,binary

          ignored as no identifying library information is supplied

        • amf-serializer,com.exadel.flamingo.flex:amf-serializer:jar:2.2.0,GNU Lesser General Public License 2.1

          ignored due to insufficient number of elements

        • amf-serializer,com.exadel.flamingo.flex:amf-serializer:jar:2.2.0,GNU Lesser General Public License 2.1,,,,,

          ignored due to too many elements

        For example: Abdera Core,org.apache.abdera:abdera-core:bundle:1.1,Apache License 2.0,http://abdera.apache.org/abdera-core,binary
        Specified by:
        extractLgplMaterials in interface BomParser
        Parameters:
        bomContents - usually the complete contents of a bom.csv file
        Returns:
        a list of Materials that fall under the LGPL license