<s> import sys <EOL> from mixbox . binding_utils import * <EOL> from . import cybox_common <EOL> from . import file_object <EOL> class PDFXRefTableListType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Cross_Reference_Table = None ) : <EOL> if Cross_Reference_Table is None : <EOL> self . Cross_Reference_Table = [ ] <EOL> else : <EOL> self . Cross_Reference_Table = Cross_Reference_Table <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFXRefTableListType . subclass : <EOL> return PDFXRefTableListType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFXRefTableListType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Cross_Reference_Table ( self ) : return self . Cross_Reference_Table <EOL> def set_Cross_Reference_Table ( self , Cross_Reference_Table ) : self . Cross_Reference_Table = Cross_Reference_Table <EOL> def add_Cross_Reference_Table ( self , value ) : self . Cross_Reference_Table . append ( value ) <EOL> def insert_Cross_Reference_Table ( self , index , value ) : self . Cross_Reference_Table [ index ] = value <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Cross_Reference_Table <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> for Cross_Reference_Table_ in self . Cross_Reference_Table : <EOL> Cross_Reference_Table_ . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFXRefTableType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . Cross_Reference_Table . append ( obj_ ) <EOL> class PDFXRefTableType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Subsections = None , Offset = None , Hashes = None ) : <EOL> self . Subsections = Subsections <EOL> self . Offset = Offset <EOL> self . Hashes = Hashes <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFXRefTableType . subclass : <EOL> return PDFXRefTableType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFXRefTableType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Subsections ( self ) : return self . Subsections <EOL> def set_Subsections ( self , Subsections ) : self . Subsections = Subsections <EOL> def get_Offset ( self ) : return self . Offset <EOL> def set_Offset ( self , Offset ) : self . Offset = Offset <EOL> def validate_PositiveIntegerObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Hashes ( self ) : return self . Hashes <EOL> def set_Hashes ( self , Hashes ) : self . Hashes = Hashes <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Subsections is not None or <EOL> self . Offset is not None or <EOL> self . Hashes is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Subsections is not None : <EOL> self . Subsections . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Offset is not None : <EOL> self . Offset . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Hashes is not None : <EOL> self . Hashes . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFXrefTableSubsectionListType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Subsections ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Offset ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . HashListType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Hashes ( obj_ ) <EOL> class PDFXrefTableSubsectionListType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Subsection = None ) : <EOL> if Subsection is None : <EOL> self . Subsection = [ ] <EOL> else : <EOL> self . Subsection = Subsection <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFXrefTableSubsectionListType . subclass : <EOL> return PDFXrefTableSubsectionListType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFXrefTableSubsectionListType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Subsection ( self ) : return self . Subsection <EOL> def set_Subsection ( self , Subsection ) : self . Subsection = Subsection <EOL> def add_Subsection ( self , value ) : self . Subsection . append ( value ) <EOL> def insert_Subsection ( self , index , value ) : self . Subsection [ index ] = value <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Subsection <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> for Subsection_ in self . Subsection : <EOL> Subsection_ . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFXrefTableSubsectionType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . Subsection . append ( obj_ ) <EOL> class PDFXrefTableSubsectionType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , First_Object_Number = None , Number_Of_Objects = None , Cross_Reference_Entries = None ) : <EOL> self . First_Object_Number = First_Object_Number <EOL> self . Number_Of_Objects = Number_Of_Objects <EOL> self . Cross_Reference_Entries = Cross_Reference_Entries <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFXrefTableSubsectionType . subclass : <EOL> return PDFXrefTableSubsectionType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFXrefTableSubsectionType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_First_Object_Number ( self ) : return self . First_Object_Number <EOL> def set_First_Object_Number ( self , First_Object_Number ) : self . First_Object_Number = First_Object_Number <EOL> def validate_NonNegativeIntegerObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Number_Of_Objects ( self ) : return self . Number_Of_Objects <EOL> def set_Number_Of_Objects ( self , Number_Of_Objects ) : self . Number_Of_Objects = Number_Of_Objects <EOL> def get_Cross_Reference_Entries ( self ) : return self . Cross_Reference_Entries <EOL> def set_Cross_Reference_Entries ( self , Cross_Reference_Entries ) : self . Cross_Reference_Entries = Cross_Reference_Entries <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . First_Object_Number is not None or <EOL> self . Number_Of_Objects is not None or <EOL> self . Cross_Reference_Entries is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . First_Object_Number is not None : <EOL> self . First_Object_Number . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Number_Of_Objects is not None : <EOL> self . Number_Of_Objects . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Cross_Reference_Entries is not None : <EOL> self . Cross_Reference_Entries . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . NonNegativeIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_First_Object_Number ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . NonNegativeIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Number_Of_Objects ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFXrefEntryListType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Cross_Reference_Entries ( obj_ ) <EOL> class PDFTrailerListType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Trailer = None ) : <EOL> if Trailer is None : <EOL> self . Trailer = [ ] <EOL> else : <EOL> self . Trailer = Trailer <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFTrailerListType . subclass : <EOL> return PDFTrailerListType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFTrailerListType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Trailer ( self ) : return self . Trailer <EOL> def set_Trailer ( self , Trailer ) : self . Trailer = Trailer <EOL> def add_Trailer ( self , value ) : self . Trailer . append ( value ) <EOL> def insert_Trailer ( self , index , value ) : self . Trailer [ index ] = value <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Trailer <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> for Trailer_ in self . Trailer : <EOL> Trailer_ . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFTrailerType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . Trailer . append ( obj_ ) <EOL> class PDFTrailerType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Size = None , Prev = None , Root = None , Encrypt = None , Info = None , ID = None , Last_Cross_Reference_Offset = None , Offset = None , Hashes = None ) : <EOL> self . Size = Size <EOL> self . Prev = Prev <EOL> self . Root = Root <EOL> self . Encrypt = Encrypt <EOL> self . Info = Info <EOL> self . ID = ID <EOL> self . Last_Cross_Reference_Offset = Last_Cross_Reference_Offset <EOL> self . Offset = Offset <EOL> self . Hashes = Hashes <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFTrailerType . subclass : <EOL> return PDFTrailerType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFTrailerType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Size ( self ) : return self . Size <EOL> def set_Size ( self , Size ) : self . Size = Size <EOL> def validate_PositiveIntegerObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Prev ( self ) : return self . Prev <EOL> def set_Prev ( self , Prev ) : self . Prev = Prev <EOL> def get_Root ( self ) : return self . Root <EOL> def set_Root ( self , Root ) : self . Root = Root <EOL> def get_Encrypt ( self ) : return self . Encrypt <EOL> def set_Encrypt ( self , Encrypt ) : self . Encrypt = Encrypt <EOL> def get_Info ( self ) : return self . Info <EOL> def set_Info ( self , Info ) : self . Info = Info <EOL> def get_ID ( self ) : return self . ID <EOL> def set_ID ( self , ID ) : self . ID = ID <EOL> def get_Last_Cross_Reference_Offset ( self ) : return self . Last_Cross_Reference_Offset <EOL> def set_Last_Cross_Reference_Offset ( self , Last_Cross_Reference_Offset ) : self . Last_Cross_Reference_Offset = Last_Cross_Reference_Offset <EOL> def get_Offset ( self ) : return self . Offset <EOL> def set_Offset ( self , Offset ) : self . Offset = Offset <EOL> def get_Hashes ( self ) : return self . Hashes <EOL> def set_Hashes ( self , Hashes ) : self . Hashes = Hashes <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Size is not None or <EOL> self . Prev is not None or <EOL> self . Root is not None or <EOL> self . Encrypt is not None or <EOL> self . Info is not None or <EOL> self . ID is not None or <EOL> self . Last_Cross_Reference_Offset is not None or <EOL> self . Offset is not None or <EOL> self . Hashes is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Size is not None : <EOL> self . Size . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Prev is not None : <EOL> self . Prev . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Root is not None : <EOL> self . Root . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Encrypt is not None : <EOL> self . Encrypt . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Info is not None : <EOL> self . Info . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . ID is not None : <EOL> self . ID . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Last_Cross_Reference_Offset is not None : <EOL> self . Last_Cross_Reference_Offset . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Offset is not None : <EOL> self . Offset . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Hashes is not None : <EOL> self . Hashes . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Size ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Prev ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFIndirectObjectIDType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Root ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFDictionaryType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Encrypt ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFIndirectObjectIDType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Info ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFFileIDType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_ID ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Last_Cross_Reference_Offset ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Offset ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . HashListType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Hashes ( obj_ ) <EOL> class PDFFileIDType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , ID_String = None ) : <EOL> if ID_String is None : <EOL> self . ID_String = [ ] <EOL> else : <EOL> self . ID_String = ID_String <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFFileIDType . subclass : <EOL> return PDFFileIDType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFFileIDType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_ID_String ( self ) : return self . ID_String <EOL> def set_ID_String ( self , ID_String ) : self . ID_String = ID_String <EOL> def add_ID_String ( self , value ) : self . ID_String . append ( value ) <EOL> def insert_ID_String ( self , index , value ) : self . ID_String [ index ] = value <EOL> def validate_StringObjectPropertyType ( self , value ) : <EOL> pass <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . ID_String <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> for ID_String_ in self . ID_String : <EOL> ID_String_ . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . ID_String . append ( obj_ ) <EOL> class PDFIndirectObjectListType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Indirect_Object = None ) : <EOL> if Indirect_Object is None : <EOL> self . Indirect_Object = [ ] <EOL> else : <EOL> self . Indirect_Object = Indirect_Object <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFIndirectObjectListType . subclass : <EOL> return PDFIndirectObjectListType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFIndirectObjectListType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Indirect_Object ( self ) : return self . Indirect_Object <EOL> def set_Indirect_Object ( self , Indirect_Object ) : self . Indirect_Object = Indirect_Object <EOL> def add_Indirect_Object ( self , value ) : self . Indirect_Object . append ( value ) <EOL> def insert_Indirect_Object ( self , index , value ) : self . Indirect_Object [ index ] = value <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Indirect_Object <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> for Indirect_Object_ in self . Indirect_Object : <EOL> Indirect_Object_ . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFIndirectObjectType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . Indirect_Object . append ( obj_ ) <EOL> class PDFIndirectObjectType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , type_ = None , ID = None , Contents = None , Offset = None , Hashes = None ) : <EOL> self . type_ = _cast ( None , type_ ) <EOL> self . ID = ID <EOL> self . Contents = Contents <EOL> self . Offset = Offset <EOL> self . Hashes = Hashes <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFIndirectObjectType . subclass : <EOL> return PDFIndirectObjectType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFIndirectObjectType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_ID ( self ) : return self . ID <EOL> def set_ID ( self , ID ) : self . ID = ID <EOL> def get_Contents ( self ) : return self . Contents <EOL> def set_Contents ( self , Contents ) : self . Contents = Contents <EOL> def get_Offset ( self ) : return self . Offset <EOL> def set_Offset ( self , Offset ) : self . Offset = Offset <EOL> def validate_PositiveIntegerObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Hashes ( self ) : return self . Hashes <EOL> def set_Hashes ( self , Hashes ) : self . Hashes = Hashes <EOL> def get_type ( self ) : return self . type_ <EOL> def set_type ( self , type_ ) : self . type_ = type_ <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . ID is not None or <EOL> self . Contents is not None or <EOL> self . Offset is not None or <EOL> self . Hashes is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> if self . type_ is not None : <EOL> lwrite ( '<STR_LIT>' % ( quote_attrib ( self . type_ ) , ) ) <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . ID is not None : <EOL> self . ID . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Contents is not None : <EOL> self . Contents . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Offset is not None : <EOL> self . Offset . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Hashes is not None : <EOL> self . Hashes . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> value = find_attr_value_ ( '<STR_LIT:type>' , node ) <EOL> if value is not None : <EOL> self . type_ = value <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFFileIDType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_ID ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFIndirectObjectContentsType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Contents ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Offset ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . HashListType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Hashes ( obj_ ) <EOL> class PDFIndirectObjectIDType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Object_Number = None , Generation_Number = None ) : <EOL> self . Object_Number = Object_Number <EOL> self . Generation_Number = Generation_Number <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFIndirectObjectIDType . subclass : <EOL> return PDFIndirectObjectIDType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFIndirectObjectIDType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Object_Number ( self ) : return self . Object_Number <EOL> def set_Object_Number ( self , Object_Number ) : self . Object_Number = Object_Number <EOL> def validate_PositiveIntegerObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Generation_Number ( self ) : return self . Generation_Number <EOL> def set_Generation_Number ( self , Generation_Number ) : self . Generation_Number = Generation_Number <EOL> def validate_NonNegativeIntegerObjectPropertyType ( self , value ) : <EOL> pass <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Object_Number is not None or <EOL> self . Generation_Number is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Object_Number is not None : <EOL> self . Object_Number . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Generation_Number is not None : <EOL> self . Generation_Number . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Object_Number ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . NonNegativeIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Generation_Number ( obj_ ) <EOL> class PDFIndirectObjectContentsType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Non_Stream_Contents = None , Stream_Contents = None ) : <EOL> self . Non_Stream_Contents = Non_Stream_Contents <EOL> self . Stream_Contents = Stream_Contents <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFIndirectObjectContentsType . subclass : <EOL> return PDFIndirectObjectContentsType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFIndirectObjectContentsType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Non_Stream_Contents ( self ) : return self . Non_Stream_Contents <EOL> def set_Non_Stream_Contents ( self , Non_Stream_Contents ) : self . Non_Stream_Contents = Non_Stream_Contents <EOL> def validate_StringObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Stream_Contents ( self ) : return self . Stream_Contents <EOL> def set_Stream_Contents ( self , Stream_Contents ) : self . Stream_Contents = Stream_Contents <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Non_Stream_Contents is not None or <EOL> self . Stream_Contents is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Non_Stream_Contents is not None : <EOL> if self . Non_Stream_Contents . get_valueOf_ ( ) is not None : <EOL> value = self . Non_Stream_Contents . get_valueOf_ ( ) <EOL> if not value . startswith ( '<STR_LIT>' ) : <EOL> value = '<STR_LIT>' + value + '<STR_LIT>' <EOL> self . Non_Stream_Contents . set_valueOf_ ( value ) <EOL> self . Non_Stream_Contents . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Stream_Contents is not None : <EOL> self . Stream_Contents . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Non_Stream_Contents ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFStreamType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Stream_Contents ( obj_ ) <EOL> class PDFStreamType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Raw_Stream = None , Raw_Stream_Hashes = None , Decoded_Stream = None , Decoded_Stream_Hashes = None ) : <EOL> self . Raw_Stream = Raw_Stream <EOL> self . Raw_Stream_Hashes = Raw_Stream_Hashes <EOL> self . Decoded_Stream = Decoded_Stream <EOL> self . Decoded_Stream_Hashes = Decoded_Stream_Hashes <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFStreamType . subclass : <EOL> return PDFStreamType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFStreamType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Raw_Stream ( self ) : return self . Raw_Stream <EOL> def set_Raw_Stream ( self , Raw_Stream ) : self . Raw_Stream = Raw_Stream <EOL> def validate_StringObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Raw_Stream_Hashes ( self ) : return self . Raw_Stream_Hashes <EOL> def set_Raw_Stream_Hashes ( self , Raw_Stream_Hashes ) : self . Raw_Stream_Hashes = Raw_Stream_Hashes <EOL> def get_Decoded_Stream ( self ) : return self . Decoded_Stream <EOL> def set_Decoded_Stream ( self , Decoded_Stream ) : self . Decoded_Stream = Decoded_Stream <EOL> def validate_HexBinaryObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Decoded_Stream_Hashes ( self ) : return self . Decoded_Stream_Hashes <EOL> def set_Decoded_Stream_Hashes ( self , Decoded_Stream_Hashes ) : self . Decoded_Stream_Hashes = Decoded_Stream_Hashes <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Raw_Stream is not None or <EOL> self . Raw_Stream_Hashes is not None or <EOL> self . Decoded_Stream is not None or <EOL> self . Decoded_Stream_Hashes is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Raw_Stream is not None : <EOL> self . Raw_Stream . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Raw_Stream_Hashes is not None : <EOL> self . Raw_Stream_Hashes . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Decoded_Stream is not None : <EOL> self . Decoded_Stream . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Decoded_Stream_Hashes is not None : <EOL> self . Decoded_Stream_Hashes . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Raw_Stream ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . HashListType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Raw_Stream_Hashes ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . HexBinaryObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Decoded_Stream ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . HashListType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Decoded_Stream_Hashes ( obj_ ) <EOL> class PDFDocumentInformationDictionaryType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Title = None , Author = None , Subject = None , Keywords = None , Creator = None , Producer = None , CreationDate = None , ModDate = None , Trapped = None ) : <EOL> self . Title = Title <EOL> self . Author = Author <EOL> self . Subject = Subject <EOL> self . Keywords = Keywords <EOL> self . Creator = Creator <EOL> self . Producer = Producer <EOL> self . CreationDate = CreationDate <EOL> self . ModDate = ModDate <EOL> self . Trapped = Trapped <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFDocumentInformationDictionaryType . subclass : <EOL> return PDFDocumentInformationDictionaryType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFDocumentInformationDictionaryType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Title ( self ) : return self . Title <EOL> def set_Title ( self , Title ) : self . Title = Title <EOL> def validate_StringObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Author ( self ) : return self . Author <EOL> def set_Author ( self , Author ) : self . Author = Author <EOL> def get_Subject ( self ) : return self . Subject <EOL> def set_Subject ( self , Subject ) : self . Subject = Subject <EOL> def get_Keywords ( self ) : return self . Keywords <EOL> def set_Keywords ( self , Keywords ) : self . Keywords = Keywords <EOL> def get_Creator ( self ) : return self . Creator <EOL> def set_Creator ( self , Creator ) : self . Creator = Creator <EOL> def get_Producer ( self ) : return self . Producer <EOL> def set_Producer ( self , Producer ) : self . Producer = Producer <EOL> def get_CreationDate ( self ) : return self . CreationDate <EOL> def set_CreationDate ( self , CreationDate ) : self . CreationDate = CreationDate <EOL> def validate_DateTimeObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_ModDate ( self ) : return self . ModDate <EOL> def set_ModDate ( self , ModDate ) : self . ModDate = ModDate <EOL> def get_Trapped ( self ) : return self . Trapped <EOL> def set_Trapped ( self , Trapped ) : self . Trapped = Trapped <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Title is not None or <EOL> self . Author is not None or <EOL> self . Subject is not None or <EOL> self . Keywords is not None or <EOL> self . Creator is not None or <EOL> self . Producer is not None or <EOL> self . CreationDate is not None or <EOL> self . ModDate is not None or <EOL> self . Trapped is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Title is not None : <EOL> self . Title . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Author is not None : <EOL> self . Author . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Subject is not None : <EOL> self . Subject . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Keywords is not None : <EOL> self . Keywords . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Creator is not None : <EOL> self . Creator . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Producer is not None : <EOL> self . Producer . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . CreationDate is not None : <EOL> self . CreationDate . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . ModDate is not None : <EOL> self . ModDate . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Trapped is not None : <EOL> self . Trapped . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Title ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Author ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Subject ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Keywords ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Creator ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Producer ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . DateTimeObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_CreationDate ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . DateTimeObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_ModDate ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Trapped ( obj_ ) <EOL> class PDFXrefEntryListType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Cross_Reference_Entry = None ) : <EOL> if Cross_Reference_Entry is None : <EOL> self . Cross_Reference_Entry = [ ] <EOL> else : <EOL> self . Cross_Reference_Entry = Cross_Reference_Entry <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFXrefEntryListType . subclass : <EOL> return PDFXrefEntryListType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFXrefEntryListType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Cross_Reference_Entry ( self ) : return self . Cross_Reference_Entry <EOL> def set_Cross_Reference_Entry ( self , Cross_Reference_Entry ) : self . Cross_Reference_Entry = Cross_Reference_Entry <EOL> def add_Cross_Reference_Entry ( self , value ) : self . Cross_Reference_Entry . append ( value ) <EOL> def insert_Cross_Reference_Entry ( self , index , value ) : self . Cross_Reference_Entry [ index ] = value <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Cross_Reference_Entry <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> for Cross_Reference_Entry_ in self . Cross_Reference_Entry : <EOL> Cross_Reference_Entry_ . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFXrefEntryType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . Cross_Reference_Entry . append ( obj_ ) <EOL> class PDFXrefEntryType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , type_ = None , Byte_Offset = None , Object_Number = None , Generation_Number = None ) : <EOL> self . type_ = _cast ( None , type_ ) <EOL> self . Byte_Offset = Byte_Offset <EOL> self . Object_Number = Object_Number <EOL> self . Generation_Number = Generation_Number <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFXrefEntryType . subclass : <EOL> return PDFXrefEntryType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFXrefEntryType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Byte_Offset ( self ) : return self . Byte_Offset <EOL> def set_Byte_Offset ( self , Byte_Offset ) : self . Byte_Offset = Byte_Offset <EOL> def validate_IntegerObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Object_Number ( self ) : return self . Object_Number <EOL> def set_Object_Number ( self , Object_Number ) : self . Object_Number = Object_Number <EOL> def validate_NonNegativeIntegerObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Generation_Number ( self ) : return self . Generation_Number <EOL> def set_Generation_Number ( self , Generation_Number ) : self . Generation_Number = Generation_Number <EOL> def get_type ( self ) : return self . type_ <EOL> def set_type ( self , type_ ) : self . type_ = type_ <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Byte_Offset is not None or <EOL> self . Object_Number is not None or <EOL> self . Generation_Number is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> if self . type_ is not None : <EOL> lwrite ( '<STR_LIT>' % ( quote_attrib ( self . type_ ) , ) ) <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Byte_Offset is not None : <EOL> self . Byte_Offset . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Object_Number is not None : <EOL> self . Object_Number . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Generation_Number is not None : <EOL> self . Generation_Number . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> value = find_attr_value_ ( '<STR_LIT:type>' , node ) <EOL> if value is not None : <EOL> self . type_ = value <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . IntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Byte_Offset ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Object_Number ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . NonNegativeIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Generation_Number ( obj_ ) <EOL> class PDFDictionaryType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Object_Reference = None , Raw_Contents = None ) : <EOL> self . Object_Reference = Object_Reference <EOL> self . Raw_Contents = Raw_Contents <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFDictionaryType . subclass : <EOL> return PDFDictionaryType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFDictionaryType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Object_Reference ( self ) : return self . Object_Reference <EOL> def set_Object_Reference ( self , Object_Reference ) : self . Object_Reference = Object_Reference <EOL> def get_Raw_Contents ( self ) : return self . Raw_Contents <EOL> def set_Raw_Contents ( self , Raw_Contents ) : self . Raw_Contents = Raw_Contents <EOL> def validate_StringObjectPropertyType ( self , value ) : <EOL> pass <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Object_Reference is not None or <EOL> self . Raw_Contents is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Object_Reference is not None : <EOL> self . Object_Reference . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Raw_Contents is not None : <EOL> if self . Raw_Contents . get_valueOf_ ( ) is not None : <EOL> value = self . Raw_Contents . get_valueOf_ ( ) <EOL> if not value . startswith ( '<STR_LIT>' ) : <EOL> value = '<STR_LIT>' + value + '<STR_LIT>' <EOL> self . Raw_Contents . set_valueOf_ ( value ) <EOL> self . Raw_Contents . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFIndirectObjectIDType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Object_Reference ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . StringObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Raw_Contents ( obj_ ) <EOL> class PDFFileMetadataType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , encrypted = None , optimized = None , Document_Information_Dictionary = None , Number_Of_Indirect_Objects = None , Number_Of_Trailers = None , Number_Of_Cross_Reference_Tables = None , Keyword_Counts = None ) : <EOL> self . encrypted = _cast ( bool , encrypted ) <EOL> self . optimized = _cast ( bool , optimized ) <EOL> self . Document_Information_Dictionary = Document_Information_Dictionary <EOL> self . Number_Of_Indirect_Objects = Number_Of_Indirect_Objects <EOL> self . Number_Of_Trailers = Number_Of_Trailers <EOL> self . Number_Of_Cross_Reference_Tables = Number_Of_Cross_Reference_Tables <EOL> self . Keyword_Counts = Keyword_Counts <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFFileMetadataType . subclass : <EOL> return PDFFileMetadataType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFFileMetadataType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Document_Information_Dictionary ( self ) : return self . Document_Information_Dictionary <EOL> def set_Document_Information_Dictionary ( self , Document_Information_Dictionary ) : self . Document_Information_Dictionary = Document_Information_Dictionary <EOL> def get_Number_Of_Indirect_Objects ( self ) : return self . Number_Of_Indirect_Objects <EOL> def set_Number_Of_Indirect_Objects ( self , Number_Of_Indirect_Objects ) : self . Number_Of_Indirect_Objects = Number_Of_Indirect_Objects <EOL> def validate_PositiveIntegerObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Number_Of_Trailers ( self ) : return self . Number_Of_Trailers <EOL> def set_Number_Of_Trailers ( self , Number_Of_Trailers ) : self . Number_Of_Trailers = Number_Of_Trailers <EOL> def get_Number_Of_Cross_Reference_Tables ( self ) : return self . Number_Of_Cross_Reference_Tables <EOL> def set_Number_Of_Cross_Reference_Tables ( self , Number_Of_Cross_Reference_Tables ) : self . Number_Of_Cross_Reference_Tables = Number_Of_Cross_Reference_Tables <EOL> def get_Keyword_Counts ( self ) : return self . Keyword_Counts <EOL> def set_Keyword_Counts ( self , Keyword_Counts ) : self . Keyword_Counts = Keyword_Counts <EOL> def get_encrypted ( self ) : return self . encrypted <EOL> def set_encrypted ( self , encrypted ) : self . encrypted = encrypted <EOL> def get_optimized ( self ) : return self . optimized <EOL> def set_optimized ( self , optimized ) : self . optimized = optimized <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Document_Information_Dictionary is not None or <EOL> self . Number_Of_Indirect_Objects is not None or <EOL> self . Number_Of_Trailers is not None or <EOL> self . Number_Of_Cross_Reference_Tables is not None or <EOL> self . Keyword_Counts is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> if self . encrypted is not None : <EOL> lwrite ( '<STR_LIT>' % self . gds_format_boolean ( self . encrypted , input_name = '<STR_LIT>' ) ) <EOL> if self . optimized is not None : <EOL> lwrite ( '<STR_LIT>' % self . gds_format_boolean ( self . optimized , input_name = '<STR_LIT>' ) ) <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Document_Information_Dictionary is not None : <EOL> self . Document_Information_Dictionary . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Number_Of_Indirect_Objects is not None : <EOL> self . Number_Of_Indirect_Objects . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Number_Of_Trailers is not None : <EOL> self . Number_Of_Trailers . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Number_Of_Cross_Reference_Tables is not None : <EOL> self . Number_Of_Cross_Reference_Tables . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Keyword_Counts is not None : <EOL> self . Keyword_Counts . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> value = find_attr_value_ ( '<STR_LIT>' , node ) <EOL> if value is not None : <EOL> if value in ( '<STR_LIT:true>' , '<STR_LIT:1>' ) : <EOL> self . encrypted = True <EOL> elif value in ( '<STR_LIT:false>' , '<STR_LIT:0>' ) : <EOL> self . encrypted = False <EOL> else : <EOL> raise_parse_error ( node , '<STR_LIT>' ) <EOL> value = find_attr_value_ ( '<STR_LIT>' , node ) <EOL> if value is not None : <EOL> if value in ( '<STR_LIT:true>' , '<STR_LIT:1>' ) : <EOL> self . optimized = True <EOL> elif value in ( '<STR_LIT:false>' , '<STR_LIT:0>' ) : <EOL> self . optimized = False <EOL> else : <EOL> raise_parse_error ( node , '<STR_LIT>' ) <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFDocumentInformationDictionaryType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Document_Information_Dictionary ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Number_Of_Indirect_Objects ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Number_Of_Trailers ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . PositiveIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Number_Of_Cross_Reference_Tables ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountsType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Keyword_Counts ( obj_ ) <EOL> class PDFKeywordCountsType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Page_Count = None , Encrypt_Count = None , ObjStm_Count = None , JS_Count = None , JavaScript_Count = None , AA_Count = None , OpenAction_Count = None , ASCIIHexDecode_Count = None , ASCII85Decode_Count = None , LZWDecode_Count = None , FlateDecode_Count = None , RunLengthDecode_Count = None , JBIG2Decode_Count = None , DCTDecode_Count = None , RichMedia_Count = None , CCITTFaxDecode_Count = None , Launch_Count = None , XFA_Count = None ) : <EOL> self . Page_Count = Page_Count <EOL> self . Encrypt_Count = Encrypt_Count <EOL> self . ObjStm_Count = ObjStm_Count <EOL> self . JS_Count = JS_Count <EOL> self . JavaScript_Count = JavaScript_Count <EOL> self . AA_Count = AA_Count <EOL> self . OpenAction_Count = OpenAction_Count <EOL> self . ASCIIHexDecode_Count = ASCIIHexDecode_Count <EOL> self . ASCII85Decode_Count = ASCII85Decode_Count <EOL> self . LZWDecode_Count = LZWDecode_Count <EOL> self . FlateDecode_Count = FlateDecode_Count <EOL> self . RunLengthDecode_Count = RunLengthDecode_Count <EOL> self . JBIG2Decode_Count = JBIG2Decode_Count <EOL> self . DCTDecode_Count = DCTDecode_Count <EOL> self . RichMedia_Count = RichMedia_Count <EOL> self . CCITTFaxDecode_Count = CCITTFaxDecode_Count <EOL> self . Launch_Count = Launch_Count <EOL> self . XFA_Count = XFA_Count <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFKeywordCountsType . subclass : <EOL> return PDFKeywordCountsType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFKeywordCountsType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Page_Count ( self ) : return self . Page_Count <EOL> def set_Page_Count ( self , Page_Count ) : self . Page_Count = Page_Count <EOL> def get_Encrypt_Count ( self ) : return self . Encrypt_Count <EOL> def set_Encrypt_Count ( self , Encrypt_Count ) : self . Encrypt_Count = Encrypt_Count <EOL> def get_ObjStm_Count ( self ) : return self . ObjStm_Count <EOL> def set_ObjStm_Count ( self , ObjStm_Count ) : self . ObjStm_Count = ObjStm_Count <EOL> def get_JS_Count ( self ) : return self . JS_Count <EOL> def set_JS_Count ( self , JS_Count ) : self . JS_Count = JS_Count <EOL> def get_JavaScript_Count ( self ) : return self . JavaScript_Count <EOL> def set_JavaScript_Count ( self , JavaScript_Count ) : self . JavaScript_Count = JavaScript_Count <EOL> def get_AA_Count ( self ) : return self . AA_Count <EOL> def set_AA_Count ( self , AA_Count ) : self . AA_Count = AA_Count <EOL> def get_OpenAction_Count ( self ) : return self . OpenAction_Count <EOL> def set_OpenAction_Count ( self , OpenAction_Count ) : self . OpenAction_Count = OpenAction_Count <EOL> def get_ASCIIHexDecode_Count ( self ) : return self . ASCIIHexDecode_Count <EOL> def set_ASCIIHexDecode_Count ( self , ASCIIHexDecode_Count ) : self . ASCIIHexDecode_Count = ASCIIHexDecode_Count <EOL> def get_ASCII85Decode_Count ( self ) : return self . ASCII85Decode_Count <EOL> def set_ASCII85Decode_Count ( self , ASCII85Decode_Count ) : self . ASCII85Decode_Count = ASCII85Decode_Count <EOL> def get_LZWDecode_Count ( self ) : return self . LZWDecode_Count <EOL> def set_LZWDecode_Count ( self , LZWDecode_Count ) : self . LZWDecode_Count = LZWDecode_Count <EOL> def get_FlateDecode_Count ( self ) : return self . FlateDecode_Count <EOL> def set_FlateDecode_Count ( self , FlateDecode_Count ) : self . FlateDecode_Count = FlateDecode_Count <EOL> def get_RunLengthDecode_Count ( self ) : return self . RunLengthDecode_Count <EOL> def set_RunLengthDecode_Count ( self , RunLengthDecode_Count ) : self . RunLengthDecode_Count = RunLengthDecode_Count <EOL> def get_JBIG2Decode_Count ( self ) : return self . JBIG2Decode_Count <EOL> def set_JBIG2Decode_Count ( self , JBIG2Decode_Count ) : self . JBIG2Decode_Count = JBIG2Decode_Count <EOL> def get_DCTDecode_Count ( self ) : return self . DCTDecode_Count <EOL> def set_DCTDecode_Count ( self , DCTDecode_Count ) : self . DCTDecode_Count = DCTDecode_Count <EOL> def get_RichMedia_Count ( self ) : return self . RichMedia_Count <EOL> def set_RichMedia_Count ( self , RichMedia_Count ) : self . RichMedia_Count = RichMedia_Count <EOL> def get_CCITTFaxDecode_Count ( self ) : return self . CCITTFaxDecode_Count <EOL> def set_CCITTFaxDecode_Count ( self , CCITTFaxDecode_Count ) : self . CCITTFaxDecode_Count = CCITTFaxDecode_Count <EOL> def get_Launch_Count ( self ) : return self . Launch_Count <EOL> def set_Launch_Count ( self , Launch_Count ) : self . Launch_Count = Launch_Count <EOL> def get_XFA_Count ( self ) : return self . XFA_Count <EOL> def set_XFA_Count ( self , XFA_Count ) : self . XFA_Count = XFA_Count <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Page_Count is not None or <EOL> self . Encrypt_Count is not None or <EOL> self . ObjStm_Count is not None or <EOL> self . JS_Count is not None or <EOL> self . JavaScript_Count is not None or <EOL> self . AA_Count is not None or <EOL> self . OpenAction_Count is not None or <EOL> self . ASCIIHexDecode_Count is not None or <EOL> self . ASCII85Decode_Count is not None or <EOL> self . LZWDecode_Count is not None or <EOL> self . FlateDecode_Count is not None or <EOL> self . RunLengthDecode_Count is not None or <EOL> self . JBIG2Decode_Count is not None or <EOL> self . DCTDecode_Count is not None or <EOL> self . RichMedia_Count is not None or <EOL> self . CCITTFaxDecode_Count is not None or <EOL> self . Launch_Count is not None or <EOL> self . XFA_Count is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Page_Count is not None : <EOL> self . Page_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Encrypt_Count is not None : <EOL> self . Encrypt_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . ObjStm_Count is not None : <EOL> self . ObjStm_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . JS_Count is not None : <EOL> self . JS_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . JavaScript_Count is not None : <EOL> self . JavaScript_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . AA_Count is not None : <EOL> self . AA_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . OpenAction_Count is not None : <EOL> self . OpenAction_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . ASCIIHexDecode_Count is not None : <EOL> self . ASCIIHexDecode_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . ASCII85Decode_Count is not None : <EOL> self . ASCII85Decode_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . LZWDecode_Count is not None : <EOL> self . LZWDecode_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . FlateDecode_Count is not None : <EOL> self . FlateDecode_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . RunLengthDecode_Count is not None : <EOL> self . RunLengthDecode_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . JBIG2Decode_Count is not None : <EOL> self . JBIG2Decode_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . DCTDecode_Count is not None : <EOL> self . DCTDecode_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . RichMedia_Count is not None : <EOL> self . RichMedia_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . CCITTFaxDecode_Count is not None : <EOL> self . CCITTFaxDecode_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Launch_Count is not None : <EOL> self . Launch_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . XFA_Count is not None : <EOL> self . XFA_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Page_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Encrypt_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_ObjStm_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_JS_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_JavaScript_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_AA_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_OpenAction_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_ASCIIHexDecode_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_ASCII85Decode_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_LZWDecode_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_FlateDecode_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_RunLengthDecode_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_JBIG2Decode_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_DCTDecode_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_RichMedia_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_CCITTFaxDecode_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Launch_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFKeywordCountType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_XFA_Count ( obj_ ) <EOL> class PDFKeywordCountType ( GeneratedsSuper ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = None <EOL> def __init__ ( self , Non_Obfuscated_Count = None , Obfuscated_Count = None ) : <EOL> self . Non_Obfuscated_Count = Non_Obfuscated_Count <EOL> self . Obfuscated_Count = Obfuscated_Count <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFKeywordCountType . subclass : <EOL> return PDFKeywordCountType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFKeywordCountType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Non_Obfuscated_Count ( self ) : return self . Non_Obfuscated_Count <EOL> def set_Non_Obfuscated_Count ( self , Non_Obfuscated_Count ) : self . Non_Obfuscated_Count = Non_Obfuscated_Count <EOL> def validate_NonNegativeIntegerObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Obfuscated_Count ( self ) : return self . Obfuscated_Count <EOL> def set_Obfuscated_Count ( self , Obfuscated_Count ) : self . Obfuscated_Count = Obfuscated_Count <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Non_Obfuscated_Count is not None or <EOL> self . Obfuscated_Count is not None <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> pass <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Non_Obfuscated_Count is not None : <EOL> self . Non_Obfuscated_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Obfuscated_Count is not None : <EOL> self . Obfuscated_Count . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> pass <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . NonNegativeIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Non_Obfuscated_Count ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . NonNegativeIntegerObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Obfuscated_Count ( obj_ ) <EOL> class PDFFileObjectType ( file_object . FileObjectType ) : <EOL> """<STR_LIT>""" <EOL> subclass = None <EOL> superclass = file_object . FileObjectType <EOL> def __init__ ( self , object_reference = None , Custom_Properties = None , xsi_type = None , is_packed = None , File_Name = None , File_Path = None , Device_Path = None , Full_Path = None , File_Extension = None , Size_In_Bytes = None , Magic_Number = None , File_Format = None , Hashes = None , Digital_Signatures = None , Modified_Time = None , Accessed_Time = None , Created_Time = None , File_Attributes_List = None , Permissions = None , User_Owner = None , Packer_List = None , Peak_Entropy = None , Sym_Links = None , Byte_Runs = None , Extracted_Features = None , Metadata = None , Version = None , Indirect_Objects = None , Cross_Reference_Tables = None , Trailers = None ) : <EOL> super ( PDFFileObjectType , self ) . __init__ ( object_reference , Custom_Properties , is_packed , File_Name , File_Path , Device_Path , Full_Path , File_Extension , Size_In_Bytes , Magic_Number , File_Format , Hashes , Digital_Signatures , Modified_Time , Accessed_Time , Created_Time , File_Attributes_List , Permissions , User_Owner , Packer_List , Peak_Entropy , Sym_Links , Byte_Runs , Extracted_Features , ) <EOL> self . Metadata = Metadata <EOL> self . Version = Version <EOL> self . Indirect_Objects = Indirect_Objects <EOL> self . Cross_Reference_Tables = Cross_Reference_Tables <EOL> self . Trailers = Trailers <EOL> def factory ( * args_ , ** kwargs_ ) : <EOL> if PDFFileObjectType . subclass : <EOL> return PDFFileObjectType . subclass ( * args_ , ** kwargs_ ) <EOL> else : <EOL> return PDFFileObjectType ( * args_ , ** kwargs_ ) <EOL> factory = staticmethod ( factory ) <EOL> def get_Metadata ( self ) : return self . Metadata <EOL> def set_Metadata ( self , Metadata ) : self . Metadata = Metadata <EOL> def get_Version ( self ) : return self . Version <EOL> def set_Version ( self , Version ) : self . Version = Version <EOL> def validate_DoubleObjectPropertyType ( self , value ) : <EOL> pass <EOL> def get_Indirect_Objects ( self ) : return self . Indirect_Objects <EOL> def set_Indirect_Objects ( self , Indirect_Objects ) : self . Indirect_Objects = Indirect_Objects <EOL> def get_Cross_Reference_Tables ( self ) : return self . Cross_Reference_Tables <EOL> def set_Cross_Reference_Tables ( self , Cross_Reference_Tables ) : self . Cross_Reference_Tables = Cross_Reference_Tables <EOL> def get_Trailers ( self ) : return self . Trailers <EOL> def set_Trailers ( self , Trailers ) : self . Trailers = Trailers <EOL> def hasContent_ ( self ) : <EOL> if ( <EOL> self . Metadata is not None or <EOL> self . Version is not None or <EOL> self . Indirect_Objects is not None or <EOL> self . Cross_Reference_Tables is not None or <EOL> self . Trailers is not None or <EOL> super ( PDFFileObjectType , self ) . hasContent_ ( ) <EOL> ) : <EOL> return True <EOL> else : <EOL> return False <EOL> def export ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , namespacedef_ = '<STR_LIT>' , pretty_print = True ) : <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , namespacedef_ and '<STR_LIT:U+0020>' + namespacedef_ or '<STR_LIT>' , ) ) <EOL> already_processed = set ( ) <EOL> self . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> if self . hasContent_ ( ) : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> self . exportChildren ( lwrite , level + <NUM_LIT:1> , namespace_ , name_ , pretty_print = pretty_print ) <EOL> showIndent ( lwrite , level , pretty_print ) <EOL> lwrite ( '<STR_LIT>' % ( namespace_ , name_ , eol_ ) ) <EOL> else : <EOL> lwrite ( '<STR_LIT>' % ( eol_ , ) ) <EOL> def exportAttributes ( self , lwrite , level , already_processed , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' ) : <EOL> super ( PDFFileObjectType , self ) . exportAttributes ( lwrite , level , already_processed , namespace_ , name_ = '<STR_LIT>' ) <EOL> def exportChildren ( self , lwrite , level , namespace_ = '<STR_LIT>' , name_ = '<STR_LIT>' , fromsubclass_ = False , pretty_print = True ) : <EOL> super ( PDFFileObjectType , self ) . exportChildren ( lwrite , level , '<STR_LIT>' , name_ , True , pretty_print = pretty_print ) <EOL> if pretty_print : <EOL> eol_ = '<STR_LIT:\n>' <EOL> else : <EOL> eol_ = '<STR_LIT>' <EOL> if self . Metadata is not None : <EOL> self . Metadata . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Version is not None : <EOL> self . Version . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Indirect_Objects is not None : <EOL> self . Indirect_Objects . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Cross_Reference_Tables is not None : <EOL> self . Cross_Reference_Tables . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> if self . Trailers is not None : <EOL> self . Trailers . export ( lwrite , level , '<STR_LIT>' , name_ = '<STR_LIT>' , pretty_print = pretty_print ) <EOL> def build ( self , node ) : <EOL> already_processed = set ( ) <EOL> self . buildAttributes ( node , node . attrib , already_processed ) <EOL> for child in node : <EOL> nodeName_ = Tag_pattern_ . match ( child . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> self . buildChildren ( child , node , nodeName_ ) <EOL> def buildAttributes ( self , node , attrs , already_processed ) : <EOL> super ( PDFFileObjectType , self ) . buildAttributes ( node , attrs , already_processed ) <EOL> def buildChildren ( self , child_ , node , nodeName_ , fromsubclass_ = False ) : <EOL> if nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFFileMetadataType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Metadata ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = cybox_common . DoubleObjectPropertyType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Version ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFIndirectObjectListType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Indirect_Objects ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFXRefTableListType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Cross_Reference_Tables ( obj_ ) <EOL> elif nodeName_ == '<STR_LIT>' : <EOL> obj_ = PDFTrailerListType . factory ( ) <EOL> obj_ . build ( child_ ) <EOL> self . set_Trailers ( obj_ ) <EOL> super ( PDFFileObjectType , self ) . buildChildren ( child_ , node , nodeName_ , True ) <EOL> GDSClassesMapping = { <EOL> '<STR_LIT>' : cybox_common . BuildUtilityType , <EOL> '<STR_LIT>' : cybox_common . ErrorsType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . PlatformIdentifierType , <EOL> '<STR_LIT>' : cybox_common . MetadataType , <EOL> '<STR_LIT>' : cybox_common . HashType , <EOL> '<STR_LIT>' : cybox_common . PositiveIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . UnsignedLongObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . NonNegativeIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . EnvironmentVariableType , <EOL> '<STR_LIT>' : cybox_common . ControlledVocabularyStringType , <EOL> '<STR_LIT>' : cybox_common . DependenciesType , <EOL> '<STR_LIT>' : cybox_common . InternalStringsType , <EOL> '<STR_LIT>' : cybox_common . FuzzyHashStructureType , <EOL> '<STR_LIT>' : cybox_common . ByteRunsType , <EOL> '<STR_LIT>' : cybox_common . MetadataType , <EOL> '<STR_LIT>' : cybox_common . HashValueType , <EOL> '<STR_LIT>' : cybox_common . DigitalSignatureInfoType , <EOL> '<STR_LIT>' : cybox_common . CodeSnippetsType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . IntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . HashListType , <EOL> '<STR_LIT>' : cybox_common . InternationalizationSettingsType , <EOL> '<STR_LIT>' : cybox_common . ToolConfigurationType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . PositiveIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . FunctionsType , <EOL> '<STR_LIT>' : cybox_common . IntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . CompilerInformalDescriptionType , <EOL> '<STR_LIT>' : cybox_common . HexBinaryObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . ObjectPropertiesType , <EOL> '<STR_LIT>' : cybox_common . PlatformSpecificationType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . DateTimeObjectPropertyType , <EOL> '<STR_LIT>' : file_object . PackerClassType , <EOL> '<STR_LIT>' : cybox_common . CompilersType , <EOL> '<STR_LIT>' : cybox_common . DigitalSignaturesType , <EOL> '<STR_LIT>' : cybox_common . ControlledVocabularyStringType , <EOL> '<STR_LIT>' : cybox_common . ExtractedStringType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . ToolInformationType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : file_object . EntryPointSignatureListType , <EOL> '<STR_LIT>' : cybox_common . HashListType , <EOL> '<STR_LIT>' : file_object . FilePathType , <EOL> '<STR_LIT>' : file_object . EntryPointSignatureType , <EOL> '<STR_LIT>' : cybox_common . ErrorInstancesType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . ErrorType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . PropertyType , <EOL> '<STR_LIT>' : cybox_common . ExtractedStringsType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . PersonnelType , <EOL> '<STR_LIT>' : file_object . PackerType , <EOL> '<STR_LIT>' : cybox_common . SimpleHashValueType , <EOL> '<STR_LIT>' : cybox_common . PositiveIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . ObjectPropertiesType , <EOL> '<STR_LIT>' : file_object . FileAttributeType , <EOL> '<STR_LIT>' : cybox_common . ConfigurationSettingsType , <EOL> '<STR_LIT>' : cybox_common . NonNegativeIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . PlatformSpecificationType , <EOL> '<STR_LIT>' : cybox_common . PositiveIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . HexBinaryObjectPropertyType , <EOL> '<STR_LIT>' : file_object . SymLinksListType , <EOL> '<STR_LIT>' : cybox_common . IntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . PositiveIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . ObjectPropertiesType , <EOL> '<STR_LIT>' : cybox_common . NonNegativeIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . UsageContextAssumptionsType , <EOL> '<STR_LIT>' : cybox_common . ToolSpecificDataType , <EOL> '<STR_LIT>' : cybox_common . ExecutionEnvironmentType , <EOL> '<STR_LIT>' : cybox_common . PlatformSpecificationType , <EOL> '<STR_LIT>' : cybox_common . IntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . HexBinaryObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . IntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . IntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . DateRangeType , <EOL> '<STR_LIT>' : cybox_common . HashListType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . HashSegmentsType , <EOL> '<STR_LIT>' : file_object . FilePermissionsType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StructuredTextType , <EOL> '<STR_LIT>' : cybox_common . FuzzyHashBlockType , <EOL> '<STR_LIT>' : cybox_common . DependencyType , <EOL> '<STR_LIT>' : file_object . PackerListType , <EOL> '<STR_LIT>' : cybox_common . TimeType , <EOL> '<STR_LIT>' : cybox_common . HexBinaryObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . ByteRunType , <EOL> '<STR_LIT>' : cybox_common . IntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . ImportsType , <EOL> '<STR_LIT>' : cybox_common . NonNegativeIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . BuildInformationType , <EOL> '<STR_LIT>' : cybox_common . ToolReferencesType , <EOL> '<STR_LIT>' : cybox_common . ControlledVocabularyStringType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . NonNegativeIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . HashValueType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . ConfigurationSettingType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StructuredTextType , <EOL> '<STR_LIT>' : cybox_common . LibrariesType , <EOL> '<STR_LIT>' : cybox_common . HashListType , <EOL> '<STR_LIT>' : cybox_common . PositiveIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StructuredTextType , <EOL> '<STR_LIT>' : cybox_common . ObjectPropertiesType , <EOL> '<STR_LIT>' : cybox_common . BuildConfigurationType , <EOL> '<STR_LIT>' : cybox_common . ExtractedFeaturesType , <EOL> '<STR_LIT>' : cybox_common . HexBinaryObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . DateTimeObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . HexBinaryObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . IntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . HashSegmentType , <EOL> '<STR_LIT>' : cybox_common . IntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . CompilerType , <EOL> '<STR_LIT:Name>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . LibraryType , <EOL> '<STR_LIT>' : cybox_common . NonNegativeIntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . StringObjectPropertyType , <EOL> '<STR_LIT>' : file_object . EPJumpCodeType , <EOL> '<STR_LIT>' : cybox_common . IntegerObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . DoubleObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . FuzzyHashValueType , <EOL> '<STR_LIT>' : cybox_common . DataSizeType , <EOL> '<STR_LIT>' : cybox_common . StructuredTextType , <EOL> '<STR_LIT>' : file_object . FileObjectType , <EOL> '<STR_LIT>' : cybox_common . ContributorType , <EOL> '<STR_LIT>' : cybox_common . DateTimeObjectPropertyType , <EOL> '<STR_LIT>' : cybox_common . ToolsInformationType , <EOL> '<STR_LIT>' : cybox_common . CustomPropertiesType , <EOL> } <EOL> USAGE_TEXT = """<STR_LIT>""" <EOL> def usage ( ) : <EOL> print ( USAGE_TEXT ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> def get_root_tag ( node ) : <EOL> tag = Tag_pattern_ . match ( node . tag ) . groups ( ) [ - <NUM_LIT:1> ] <EOL> rootClass = GDSClassesMapping . get ( tag ) <EOL> if rootClass is None : <EOL> rootClass = globals ( ) . get ( tag ) <EOL> return tag , rootClass <EOL> def parse ( inFileName ) : <EOL> doc = parsexml_ ( inFileName ) <EOL> rootNode = doc . getroot ( ) <EOL> rootTag , rootClass = get_root_tag ( rootNode ) <EOL> if rootClass is None : <EOL> rootTag = '<STR_LIT>' <EOL> rootClass = PDFFileObjectType <EOL> rootObj = rootClass . factory ( ) <EOL> rootObj . build ( rootNode ) <EOL> doc = None <EOL> return rootObj <EOL> def parseEtree ( inFileName ) : <EOL> doc = parsexml_ ( inFileName ) <EOL> rootNode = doc . getroot ( ) <EOL> rootTag , rootClass = get_root_tag ( rootNode ) <EOL> if rootClass is None : <EOL> rootTag = '<STR_LIT>' <EOL> rootClass = PDFFileObjectType <EOL> rootObj = rootClass . factory ( ) <EOL> rootObj . build ( rootNode ) <EOL> doc = None <EOL> rootElement = rootObj . to_etree ( None , name_ = rootTag ) <EOL> content = etree_ . tostring ( rootElement , pretty_print = True , <EOL> xml_declaration = True , encoding = "<STR_LIT:utf-8>" ) <EOL> sys . stdout . write ( content ) <EOL> sys . stdout . write ( '<STR_LIT:\n>' ) <EOL> return rootObj , rootElement <EOL> def parseString ( inString ) : <EOL> from mixbox . vendor . six import StringIO <EOL> doc = parsexml_ ( StringIO ( inString ) ) <EOL> rootNode = doc . getroot ( ) <EOL> rootTag , rootClass = get_root_tag ( rootNode ) <EOL> if rootClass is None : <EOL> rootTag = '<STR_LIT>' <EOL> rootClass = PDFFileObjectType <EOL> rootObj = rootClass . factory ( ) <EOL> rootObj . build ( rootNode ) <EOL> doc = None <EOL> return rootObj <EOL> def main ( ) : <EOL> args = sys . argv [ <NUM_LIT:1> : ] <EOL> if len ( args ) == <NUM_LIT:1> : <EOL> parse ( args [ <NUM_LIT:0> ] ) <EOL> else : <EOL> usage ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) <EOL> __all__ = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] </s>
