def __init__(self,
              json,
              ref_resolver,
              disable_refs,
              availability_finder,
              parse_cache,
              template_data_source,
              idl=False):
     self._ref_resolver = ref_resolver
     self._disable_refs = disable_refs
     self._availability_finder = availability_finder
     self._intro_tables = parse_cache.GetFromFile('%s/intro_tables.json' %
                                                  svn_constants.JSON_PATH)
     self._api_features = parse_cache.GetFromFile('%s/_api_features.json' %
                                                  svn_constants.API_PATH)
     self._template_data_source = template_data_source
     clean_json = copy.deepcopy(json)
     if _RemoveNoDocs(clean_json):
         self._namespace = None
     else:
         if idl:
             _DetectInlineableTypes(clean_json)
         _InlineDocs(clean_json)
         self._namespace = model.Namespace(clean_json,
                                           clean_json['namespace'])
Beispiel #2
0
 def __init__(self, json):
     clean_json = copy.deepcopy(json)
     if _RemoveNoDocs(clean_json):
         self._namespace = None
     else:
         self._namespace = model.Namespace(clean_json,
                                           clean_json['namespace'])
Beispiel #3
0
 def __init__(self,
              json,
              ref_resolver,
              disable_refs,
              availability_finder,
              branch_utility,
              parse_cache,
              template_cache,
              event_byname_function,
              idl=False):
     self._ref_resolver = ref_resolver
     self._disable_refs = disable_refs
     self._availability_finder = availability_finder
     self._branch_utility = branch_utility
     self._api_availabilities = parse_cache.GetFromFile(
         '%s/api_availabilities.json' % svn_constants.JSON_PATH)
     self._intro_tables = parse_cache.GetFromFile('%s/intro_tables.json' %
                                                  svn_constants.JSON_PATH)
     self._api_features = parse_cache.GetFromFile('%s/_api_features.json' %
                                                  svn_constants.API_PATH)
     self._template_cache = template_cache
     self._event_byname_function = event_byname_function
     clean_json = copy.deepcopy(json)
     if RemoveNoDocs(clean_json):
         self._namespace = None
     else:
         if idl:
             DetectInlineableTypes(clean_json)
         InlineDocs(clean_json)
         self._namespace = model.Namespace(clean_json,
                                           clean_json['namespace'])
Beispiel #4
0
 def __init__(self, json):
     clean_json = copy.deepcopy(json)
     _RemoveNoDocs(clean_json)
     try:
         self._namespace = model.Namespace(clean_json,
                                           clean_json['namespace'])
     except Exception as e:
         logging.info(e)
Beispiel #5
0
 def __init__(self, json, ref_resolver, disable_refs):
   self._ref_resolver = ref_resolver
   self._disable_refs = disable_refs
   clean_json = copy.deepcopy(json)
   if _RemoveNoDocs(clean_json):
     self._namespace = None
   else:
     self._namespace = model.Namespace(clean_json, clean_json['namespace'])
 def __init__(self, json, ref_resolver, disable_refs, idl=False):
   self._ref_resolver = ref_resolver
   self._disable_refs = disable_refs
   clean_json = copy.deepcopy(json)
   if _RemoveNoDocs(clean_json):
     self._namespace = None
   else:
     if idl:
       _DetectInlineableTypes(clean_json)
     _InlineDocs(clean_json)
     self._namespace = model.Namespace(clean_json, clean_json['namespace'])