parameters: (self, table, geom_column, extent, srid, dim=2)
docstring: Inserts a line for the table in Oracle Metadata table.
docstring_summary: Inserts a line for the table in Oracle Metadata table.
docstring_tokens: Inserts a line for the table in Oracle Metadata table .
function: def insertMetadata(self, table, geom_column, extent, srid, dim=2):
          """Inserts a line for the table in Oracle Metadata table."""
          schema, tablename = self.getSchemaTableName(table)
          if not (self.getRawTablePrivileges('USER_SDO_GEOM_METADATA',
                                             'MDSYS',
                                             'PUBLIC')[1] and
                  schema == self.user):
              return False
  
          # in Metadata view, geographic column is always in uppercase
          geom_column = geom_column.upper()
          if srid == 0:
              srid = -1
  
          if len(extent) != 4:
              return False
          dims = [u'X', u'Y', u'Z', u'T']
          extentParts = []
          for i in range(dim):
              extentParts.append(
                  u"""MDSYS.SDO_DIM_ELEMENT(
                  '{0}', {1:.9f}, {2:.9f}, 0.005)""".format(dims[i],
                                                            extent[i],
                                                            extent[i + 1]))
          extentParts = u",".join(extentParts)
          sqlExtent = u"""MDSYS.SDO_DIM_ARRAY(
                  {})
                  """.format(extentParts)
  
          sql = u"""
          INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME,
                                             COLUMN_NAME, DIMINFO,
                                             SRID)
          VALUES({0}, {1},
                 {2},
                 {3})
              """.format(self.quoteString(tablename),
                         self.quoteString(geom_column),
                         sqlExtent, str(srid))
  
          self._execute_and_commit(sql)
function_tokens: def insertMetadata ( self , table , geom_column , extent , srid , dim = 2 ) : schema , tablename = self . getSchemaTableName ( table ) if not ( self . getRawTablePrivileges ( 'USER_SDO_GEOM_METADATA' , 'MDSYS' , 'PUBLIC' ) [ 1 ] and schema == self . user ) : return False # in Metadata view, geographic column is always in uppercase geom_column = geom_column . upper ( ) if srid == 0 : srid = - 1 if len ( extent ) != 4 : return False dims = [ u'X' , u'Y' , u'Z' , u'T' ] extentParts = [ ] for i in range ( dim ) : extentParts . append ( u"""MDSYS.SDO_DIM_ELEMENT(
                  '{0}', {1:.9f}, {2:.9f}, 0.005)""" . format ( dims [ i ] , extent [ i ] , extent [ i + 1 ] ) ) extentParts = u"," . join ( extentParts ) sqlExtent = u"""MDSYS.SDO_DIM_ARRAY(
                  {})
                  """ . format ( extentParts ) sql = u"""
          INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME,
                                             COLUMN_NAME, DIMINFO,
                                             SRID)
          VALUES({0}, {1},
                 {2},
                 {3})
              """ . format ( self . quoteString ( tablename ) , self . quoteString ( geom_column ) , sqlExtent , str ( srid ) ) self . _execute_and_commit ( sql )