# Path: spdx/document.py
# class ExternalDocumentRef(object):
# class License(object):
# class LicenseConjunction(License):
# class LicenseDisjunction(License):
# class ExtractedLicense(License):
# class Document(object):
#     def __init__(
#         self, external_document_id=None, spdx_document_uri=None, check_sum=None
#     ):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def validate(self, messages):
#     def validate_ext_doc_id(self, messages):
#     def validate_spdx_doc_uri(self, messages):
#     def validate_checksum(self, messages):
# def _add_parens(required, text):
#     def __init__(self, full_name, identifier):
#     def from_identifier(cls, identifier):
#     def from_full_name(cls, full_name):
#     def url(self):
#     def full_name(self):
#     def full_name(self, value):
#     def set_full_name(self, value):
#     def identifier(self):
#     def identifier(self, value):
#     def set_identifier(self, value):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def __str__(self):
#     def __hash__(self):
#     def __init__(self, license_1, license_2):
#     def full_name(self):
#     def identifier(self):
#     def __init__(self, license_1, license_2):
#     def full_name(self):
#     def identifier(self):
#     def __init__(self, identifier):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def add_xref(self, ref):
#     def validate(self, messages):
#     def __init__(
#         self,
#         version=None,
#         data_license=None,
#         name=None,
#         spdx_id=None,
#         namespace=None,
#         comment=None,
#         package=None,
#         license_list_version=None,
#     ):
#     def add_review(self, review):
#     def add_annotation(self, annotation):
#     def add_relationships(self, relationship):
#     def add_extr_lic(self, lic):
#     def add_ext_document_reference(self, ext_doc_ref):
#     def add_snippet(self, snip):
#     def add_package(self, package):
#     def package(self):
#     def package(self, value):
#     def files(self):
#     def files(self, value):
#     def has_comment(self):
#     def validate(self, messages=None):
#     def validate_version(self, messages):
#     def validate_data_lics(self, messages):
#     def validate_name(self, messages):
#     def validate_namespace(self, messages):
#     def validate_spdx_id(self, messages):
#     def validate_ext_document_references(self, messages):
#     def validate_reviews(self, messages):
#     def validate_annotations(self, messages):
#     def validate_relationships(self, messages):
#     def validate_snippet(self, messages=None):
#     def validate_creation_info(self, messages):
#     def validate_packages(self, messages):
#     def validate_package(self, messages):
#     def validate_extracted_licenses(self, messages):


from rdflib import Literal
from spdx import document
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#     http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.




class BaseWriter(object):
    """
    Base class for all Writer classes.
    Provide utility functions and stores shared fields.
    - document: spdx.document class. Source of data to be written
    - document_object: python dictionary representation of the entire spdx.document
    """

    def __init__(self, document):
        self.document = document
        self.document_object = dict()

    def license(self, license_field):
        """
        Return a string representation of a license or spdx.utils special object
        """
        if isinstance(

# Path: spdx/document.py
# class ExternalDocumentRef(object):
# class License(object):
# class LicenseConjunction(License):
# class LicenseDisjunction(License):
# class ExtractedLicense(License):
# class Document(object):
#     def __init__(
#         self, external_document_id=None, spdx_document_uri=None, check_sum=None
#     ):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def validate(self, messages):
#     def validate_ext_doc_id(self, messages):
#     def validate_spdx_doc_uri(self, messages):
#     def validate_checksum(self, messages):
# def _add_parens(required, text):
#     def __init__(self, full_name, identifier):
#     def from_identifier(cls, identifier):
#     def from_full_name(cls, full_name):
#     def url(self):
#     def full_name(self):
#     def full_name(self, value):
#     def set_full_name(self, value):
#     def identifier(self):
#     def identifier(self, value):
#     def set_identifier(self, value):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def __str__(self):
#     def __hash__(self):
#     def __init__(self, license_1, license_2):
#     def full_name(self):
#     def identifier(self):
#     def __init__(self, license_1, license_2):
#     def full_name(self):
#     def identifier(self):
#     def __init__(self, identifier):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def add_xref(self, ref):
#     def validate(self, messages):
#     def __init__(
#         self,
#         version=None,
#         data_license=None,
#         name=None,
#         spdx_id=None,
#         namespace=None,
#         comment=None,
#         package=None,
#         license_list_version=None,
#     ):
#     def add_review(self, review):
#     def add_annotation(self, annotation):
#     def add_relationships(self, relationship):
#     def add_extr_lic(self, lic):
#     def add_ext_document_reference(self, ext_doc_ref):
#     def add_snippet(self, snip):
#     def add_package(self, package):
#     def package(self):
#     def package(self, value):
#     def files(self):
#     def files(self, value):
#     def has_comment(self):
#     def validate(self, messages=None):
#     def validate_version(self, messages):
#     def validate_data_lics(self, messages):
#     def validate_name(self, messages):
#     def validate_namespace(self, messages):
#     def validate_spdx_id(self, messages):
#     def validate_ext_document_references(self, messages):
#     def validate_reviews(self, messages):
#     def validate_annotations(self, messages):
#     def validate_relationships(self, messages):
#     def validate_snippet(self, messages=None):
#     def validate_creation_info(self, messages):
#     def validate_packages(self, messages):
#     def validate_package(self, messages):
#     def validate_extracted_licenses(self, messages):


# Path: spdx/writers/jsonyamlxml.py
from rdflib import Literal
from spdx import document

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#     http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.




class BaseWriter(object):
    """
    Base class for all Writer classes.
    Provide utility functions and stores shared fields.
    - document: spdx.document class. Source of data to be written
    - document_object: python dictionary representation of the entire spdx.document
    """

    def __init__(self, document):
        self.document = document
        self.document_object = dict()

    def license(self, license_field):
        """
        Return a string representation of a license or spdx.utils special object
        """
        if isinstance(

            license_field, (document.LicenseDisjunction, document.LicenseConjunction)