Example #1
0
 def p_prj_home_art_2(self, p):
     """prj_home_art : ART_PRJ_HOME UN_KNOWN"""
     try:
         self.builder.set_file_atrificat_of_project(self.document,
             'home', utils.UnKnown())
     except OrderError:
         self.order_error('ArtifactOfProjectName', 'FileName', p.lineno(1))
Example #2
0
 def p_prj_uri_art_1(self, p):
     """prj_uri_art : ART_PRJ_URI UN_KNOWN"""
     try:
         self.builder.set_file_atrificat_of_project(self.document,
             'uri', utils.UnKnown())
     except OrderError:
         self.order_error('ArtificatOfProjectURI', 'FileName', p.lineno(1))
Example #3
0
 def to_special_value(self, value):
     """Checks if value is a special SPDX value such as
     NONE, NOASSERTION or UNKNOWN if so returns proper model.
     else returns value"""
     if value == self.spdx_namespace.none:
         return utils.SPDXNone()
     elif value == self.spdx_namespace.noassertion:
         return utils.NoAssert()
     elif value == self.spdx_namespace.unknown:
         return utils.UnKnown()
     else:
         return value