Class CycloneDxSchema

java.lang.Object
org.cyclonedx.CycloneDxSchema
Direct Known Subclasses:
AbstractBomGenerator, JsonParser, XmlParser

public abstract class CycloneDxSchema extends Object
CycloneDxSchema is a base class that provides schema information to BomXmlGenerator, BomJsonGenerator, and Parser. The class can be extended for other implementations as well.
Since:
1.1.0
  • Field Details

  • Constructor Details

    • CycloneDxSchema

      public CycloneDxSchema()
  • Method Details

    • getJsonSchema

      public com.networknt.schema.JsonSchema getJsonSchema(Version schemaVersion, com.fasterxml.jackson.databind.ObjectMapper mapper) throws IOException
      Returns the CycloneDX JsonSchema for the specified schema version.
      Parameters:
      schemaVersion - The version to return the schema for
      mapper - is to provide a Jackson ObjectMapper
      Returns:
      a Schema
      Throws:
      IOException - when errors are encountered
      Since:
      6.0.0
    • getJsonSchemaAsStream

      private InputStream getJsonSchemaAsStream(Version schemaVersion)
    • getXmlSchema

      public Schema getXmlSchema(Version schemaVersion) throws SAXException
      Returns the CycloneDX XML Schema for the specified schema version.
      Parameters:
      schemaVersion - The version to return the schema for
      Returns:
      a Schema
      Throws:
      SAXException - a SAXException
      Since:
      2.0.0
    • getXmlSchema10

      private Schema getXmlSchema10() throws SAXException
      Returns the CycloneDX XML Schema from the specifications XSD.
      Returns:
      a Schema
      Throws:
      SAXException - a SAXException
      Since:
      1.1.0
    • getXmlSchema11

      private Schema getXmlSchema11() throws SAXException
      Returns the CycloneDX XML Schema from the specifications XSD.
      Returns:
      a Schema
      Throws:
      SAXException - a SAXException
      Since:
      2.0.0
    • getXmlSchema12

      private Schema getXmlSchema12() throws SAXException
      Returns the CycloneDX XML Schema from the specifications XSD.
      Returns:
      a Schema
      Throws:
      SAXException - a SAXException
      Since:
      2.8.0
    • getXmlSchema13

      private Schema getXmlSchema13() throws SAXException
      Returns the CycloneDX XML Schema from the specifications XSD.
      Returns:
      a Schema
      Throws:
      SAXException - a SAXException
      Since:
      5.0.0
    • getXmlSchema14

      private Schema getXmlSchema14() throws SAXException
      Returns the CycloneDX XML Schema from the specifications XSD.
      Returns:
      a Schema
      Throws:
      SAXException - a SAXException
      Since:
      5.1.0
    • getXmlSchema15

      private Schema getXmlSchema15() throws SAXException
      Returns the CycloneDX XML Schema from the specifications XSD.
      Returns:
      a Schema
      Throws:
      SAXException - a SAXException
      Since:
      8.0.1
    • getXmlSchema16

      private Schema getXmlSchema16() throws SAXException
      Returns the CycloneDX XML Schema from the specifications XSD.
      Returns:
      a Schema
      Throws:
      SAXException - a SAXException
      Since:
      8.1.0
    • getXmlSchema

      public Schema getXmlSchema(InputStream... inputStreams) throws SAXException
      Throws:
      SAXException