Package org.spdx.tag
Class BuildDocument
java.lang.Object
org.spdx.tag.BuildDocument
- All Implemented Interfaces:
TagValueBehavior
public class BuildDocument extends Object implements TagValueBehavior
Translates an tag-value file to a an SPDX Document.
Supports SPDX version 2.0
2.0 changes made by Gary O'Neall
- Author:
- Rana Rahal, Protecode Inc.
-
Field Summary
Fields Modifier and Type Field Description static PatternCHECKSUM_PATTERN -
Constructor Summary
Constructors Constructor Description BuildDocument(SpdxDocumentContainer[] result, Properties constants, List<String> warnings) -
Method Summary
Modifier and Type Method Description voidbuildDocument(String tag, String value, int lineNumber)voidenter()voidexit()static ChecksumparseChecksum(String value, int lineNumber)Creates a Checksum from the parameters specified in the tag valuestatic ExternalDocumentRefparseExternalDocumentRef(String refStr, int lineNumber)Parse a tag/value external document reference string
-
Field Details
-
Constructor Details
-
Method Details
-
enter
- Specified by:
enterin interfaceTagValueBehavior- Throws:
Exception
-
buildDocument
- Specified by:
buildDocumentin interfaceTagValueBehavior- Throws:
Exception
-
parseExternalDocumentRef
public static ExternalDocumentRef parseExternalDocumentRef(String refStr, int lineNumber) throws InvalidSpdxTagFileExceptionParse a tag/value external document reference string- Parameters:
refStr-lineNumber-- Returns:
- Throws:
InvalidSpdxTagFileException
-
parseChecksum
public static Checksum parseChecksum(String value, int lineNumber) throws InvalidSpdxTagFileExceptionCreates a Checksum from the parameters specified in the tag value- Parameters:
value-lineNumber-- Returns:
- Throws:
InvalidSpdxTagFileException
-
exit
- Specified by:
exitin interfaceTagValueBehavior- Throws:
Exception
-