class SPDXParser extends LicenseInfoParser {

    public <T> LicenseInfoParsingResult getLicenseInfo(Attachment attachment, User user, T context) throws TException {
        AttachmentContent attachmentContent = attachmentContentProvider.getAttachmentContent(attachment);

        final Optional<SpdxDocument> spdxDocument = openAsSpdx(attachmentContent, user, context);
        if(! spdxDocument.isPresent()){
            return new LicenseInfoParsingResult()
                    .setStatus(LicenseInfoRequestStatus.FAILURE);
        }

        return getLicenseInfoFromSpdx(attachmentContent, spdxDocument.get());
    }

    public  SPDXParser(AttachmentConnector attachmentConnector, AttachmentContentProvider attachmentContentProvider);

}