Package org.cyclonedx
Class CycloneDxSchema
- java.lang.Object
-
- org.cyclonedx.CycloneDxSchema
-
- Direct Known Subclasses:
AbstractBomGenerator,JsonParser,XmlParser
public abstract class CycloneDxSchema extends java.lang.ObjectCycloneDxSchema is a base class that provides schema information toBomXmlGenerator,BomJsonGenerator, andParser. The class can be extended for other implementations as well.- Since:
- 1.1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<Version>ALL_VERSIONSstatic java.lang.StringNS_BOM_10static java.lang.StringNS_BOM_11static java.lang.StringNS_BOM_12static java.lang.StringNS_BOM_13static java.lang.StringNS_BOM_14static java.lang.StringNS_BOM_15static java.lang.StringNS_BOM_16static java.lang.StringNS_BOM_LATESTstatic java.lang.StringNS_DEPENDENCY_GRAPH_10Deprecated.static VersionVERSION_LATEST
-
Constructor Summary
Constructors Constructor Description CycloneDxSchema()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.networknt.schema.JsonSchemagetJsonSchema(Version schemaVersion, com.fasterxml.jackson.databind.ObjectMapper mapper)Returns the CycloneDX JsonSchema for the specified schema version.private java.io.InputStreamgetJsonSchemaAsStream(Version schemaVersion)javax.xml.validation.SchemagetXmlSchema(java.io.InputStream... inputStreams)javax.xml.validation.SchemagetXmlSchema(Version schemaVersion)Returns the CycloneDX XML Schema for the specified schema version.private javax.xml.validation.SchemagetXmlSchema10()Returns the CycloneDX XML Schema from the specifications XSD.private javax.xml.validation.SchemagetXmlSchema11()Returns the CycloneDX XML Schema from the specifications XSD.private javax.xml.validation.SchemagetXmlSchema12()Returns the CycloneDX XML Schema from the specifications XSD.private javax.xml.validation.SchemagetXmlSchema13()Returns the CycloneDX XML Schema from the specifications XSD.private javax.xml.validation.SchemagetXmlSchema14()Returns the CycloneDX XML Schema from the specifications XSD.private javax.xml.validation.SchemagetXmlSchema15()Returns the CycloneDX XML Schema from the specifications XSD.private javax.xml.validation.SchemagetXmlSchema16()Returns the CycloneDX XML Schema from the specifications XSD.
-
-
-
Field Detail
-
NS_BOM_10
public static final java.lang.String NS_BOM_10
- See Also:
- Constant Field Values
-
NS_BOM_11
public static final java.lang.String NS_BOM_11
- See Also:
- Constant Field Values
-
NS_BOM_12
public static final java.lang.String NS_BOM_12
- See Also:
- Constant Field Values
-
NS_BOM_13
public static final java.lang.String NS_BOM_13
- See Also:
- Constant Field Values
-
NS_BOM_14
public static final java.lang.String NS_BOM_14
- See Also:
- Constant Field Values
-
NS_BOM_15
public static final java.lang.String NS_BOM_15
- See Also:
- Constant Field Values
-
NS_BOM_16
public static final java.lang.String NS_BOM_16
- See Also:
- Constant Field Values
-
NS_DEPENDENCY_GRAPH_10
@Deprecated public static final java.lang.String NS_DEPENDENCY_GRAPH_10
Deprecated.- See Also:
- Constant Field Values
-
NS_BOM_LATEST
public static final java.lang.String NS_BOM_LATEST
- See Also:
- Constant Field Values
-
VERSION_LATEST
public static final Version VERSION_LATEST
-
ALL_VERSIONS
public static final java.util.List<Version> ALL_VERSIONS
-
-
Method Detail
-
getJsonSchema
public com.networknt.schema.JsonSchema getJsonSchema(Version schemaVersion, com.fasterxml.jackson.databind.ObjectMapper mapper) throws java.io.IOException
Returns the CycloneDX JsonSchema for the specified schema version.- Parameters:
schemaVersion- The version to return the schema formapper- is to provide a Jackson ObjectMapper- Returns:
- a Schema
- Throws:
java.io.IOException- when errors are encountered- Since:
- 6.0.0
-
getJsonSchemaAsStream
private java.io.InputStream getJsonSchemaAsStream(Version schemaVersion)
-
getXmlSchema
public javax.xml.validation.Schema getXmlSchema(Version schemaVersion) throws org.xml.sax.SAXException
Returns the CycloneDX XML Schema for the specified schema version.- Parameters:
schemaVersion- The version to return the schema for- Returns:
- a Schema
- Throws:
org.xml.sax.SAXException- a SAXException- Since:
- 2.0.0
-
getXmlSchema10
private javax.xml.validation.Schema getXmlSchema10() throws org.xml.sax.SAXExceptionReturns the CycloneDX XML Schema from the specifications XSD.- Returns:
- a Schema
- Throws:
org.xml.sax.SAXException- a SAXException- Since:
- 1.1.0
-
getXmlSchema11
private javax.xml.validation.Schema getXmlSchema11() throws org.xml.sax.SAXExceptionReturns the CycloneDX XML Schema from the specifications XSD.- Returns:
- a Schema
- Throws:
org.xml.sax.SAXException- a SAXException- Since:
- 2.0.0
-
getXmlSchema12
private javax.xml.validation.Schema getXmlSchema12() throws org.xml.sax.SAXExceptionReturns the CycloneDX XML Schema from the specifications XSD.- Returns:
- a Schema
- Throws:
org.xml.sax.SAXException- a SAXException- Since:
- 2.8.0
-
getXmlSchema13
private javax.xml.validation.Schema getXmlSchema13() throws org.xml.sax.SAXExceptionReturns the CycloneDX XML Schema from the specifications XSD.- Returns:
- a Schema
- Throws:
org.xml.sax.SAXException- a SAXException- Since:
- 5.0.0
-
getXmlSchema14
private javax.xml.validation.Schema getXmlSchema14() throws org.xml.sax.SAXExceptionReturns the CycloneDX XML Schema from the specifications XSD.- Returns:
- a Schema
- Throws:
org.xml.sax.SAXException- a SAXException- Since:
- 5.1.0
-
getXmlSchema15
private javax.xml.validation.Schema getXmlSchema15() throws org.xml.sax.SAXExceptionReturns the CycloneDX XML Schema from the specifications XSD.- Returns:
- a Schema
- Throws:
org.xml.sax.SAXException- a SAXException- Since:
- 8.0.1
-
getXmlSchema16
private javax.xml.validation.Schema getXmlSchema16() throws org.xml.sax.SAXExceptionReturns the CycloneDX XML Schema from the specifications XSD.- Returns:
- a Schema
- Throws:
org.xml.sax.SAXException- a SAXException- Since:
- 8.1.0
-
getXmlSchema
public javax.xml.validation.Schema getXmlSchema(java.io.InputStream... inputStreams) throws org.xml.sax.SAXException- Throws:
org.xml.sax.SAXException
-
-