Gets the imagery meta from the REST service, or null if it fails
424810
private ImageryMetaDataResource getMetaData() {
        Log.d(IMapView.LOGTAG, "getMetaData");

        ImageryMetaDataResource returnValue = null;

        InputStream in = null;
        HttpURLConnection client = null;
        ByteArrayOutputStream dataStream = null;
        BufferedOutputStream out = null;
        try {
            client = (HttpURLConnection) (new URL(String.format(BASE_URL_PATTERN, mStyle, mBingMapKey)).openConnection());
            Log.d(IMapView.LOGTAG, "make request " + client.getURL().toString().toString());
            client.setRequestProperty(Configuration.getInstance().getUserAgentHttpHeader(), Configuration.getInstance().getUserAgentValue());
            for (final Map.Entry<String, String> entry : Configuration.getInstance().getAdditionalHttpRequestProperties().entrySet()) {
                client.setRequestProperty(entry.getKey(), entry.getValue());
            }
            client.connect();

            if (client.getResponseCode() != 200) {
                Log.e(IMapView.LOGTAG, "Cannot get response for url " + client.getURL().toString() + " " + client.getResponseMessage());

            } else {

                in = client.getInputStream();
                dataStream = new ByteArrayOutputStream();
                out = new BufferedOutputStream(dataStream, StreamUtils.IO_BUFFER_SIZE);
                StreamUtils.copy(in, out);
                out.flush();

                returnValue = ImageryMetaData.getInstanceFromJSON(dataStream.toString());
            }
        } catch (final Exception e) {
            Log.e(IMapView.LOGTAG, "Error getting imagery meta data", e);
        } finally {
            if (client != null)
                try {
                    client.disconnect();
                } catch (Exception e) {
                    Log.d(IMapView.LOGTAG, "end getMetaData", e);
                }
            if (in != null)
                try {
                    in.close();
                } catch (Exception e) {
                    Log.d(IMapView.LOGTAG, "end getMetaData", e);
                }
            if (dataStream != null)
                try {
                    dataStream.close();
                } catch (Exception e) {
                    Log.d(IMapView.LOGTAG, "end getMetaData", e);
                }
            if (out != null)
                try {
                    out.close();
                } catch (Exception e) {
                    Log.d(IMapView.LOGTAG, "end getMetaData", e);
                }
            Log.d(IMapView.LOGTAG, "end getMetaData");
        }
        return returnValue;
    }
855030
def get(self, sid):
        
        return SyncMapContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
1093346
private ImageMetaData readImageMetaData() {
    InputStream inputStream = null;
    ImageMetaData metaData = null;
    try {
      inputStream = getInputStream();
      metaData = BitmapUtil.decodeDimensionsAndColorSpace(inputStream);
      mColorSpace = metaData.getColorSpace();
      Pair<Integer, Integer> dimensions = metaData.getDimensions();
      if (dimensions != null) {
        mWidth = dimensions.first;
        mHeight = dimensions.second;
      }
    } finally {
      if (inputStream != null) {
        try {
          inputStream.close();
        } catch (IOException e) {
          // Head in the sand
        }
      }
    }
    return metaData;
  }
1239259
@GetMapping("/sp/metadata")
    public ResponseEntity<String> getFirstServiceProviderMetadata() {
        val saml2Client = builtClients.findClient(SAML2Client.class);
        if (saml2Client != null) {
            return getSaml2ClientServiceProviderMetadataResponseEntity(saml2Client);
        }
        return getNotAcceptableResponseEntity();
    }
1364892
protected function get_meta_data() {
        //gather meta data
        if (empty($this->imagestring)) {
            $info = getimagesize($this->filename);
            switch ($info['mime']) {
                case 'image/gif':
                    $this->image = imagecreatefromgif($this->filename);
                    break;
                case 'image/jpeg':
                    $this->image = imagecreatefromjpeg($this->filename);
                    break;
                case 'image/png':
                    $this->image = imagecreatefrompng($this->filename);
                    break;
                default:
                    throw new Exception('Invalid image: ' . $this->filename);
                    break;
            }
        } elseif (function_exists('getimagesizefromstring')) {
            $info = getimagesizefromstring($this->imagestring);
        } else {
            throw new Exception('PHP 5.4 is required to use method getimagesizefromstring');
        }
        $this->original_info = array(
            'width' => $info[0],
            'height' => $info[1],
            'orientation' => $this->get_orientation(),
            'exif' => function_exists('exif_read_data') && $info['mime'] === 'image/jpeg' && $this->imagestring === null ? $this->exif = @exif_read_data($this->filename) : null,
            'format' => preg_replace('/^image\//', '', $info['mime']),
            'mime' => $info['mime']
        );
        $this->width = $info[0];
        $this->height = $info[1];
        imagesavealpha($this->image, true);
        imagealphablending($this->image, true);
        return $this;
    }
1151831
@GetMapping(path = WSFederationConstants.ENDPOINT_FEDERATION_METADATA)
    public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
        try {
            response.setContentType(MediaType.TEXT_HTML_VALUE);
            val out = response.getWriter();
            val metadata = WSFederationMetadataWriter.produceMetadataDocument(casProperties);
            out.write(DOM2Writer.nodeToString(metadata));
        } catch (final Exception ex) {
            LOGGER.error("Failed to get metadata document", ex);
            response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        }
    }
101426
def get_image_id(self, namespace, respository, tag):
        """"""
        return self._http_call(self.TAGS + '/' + tag, get,
                               namespace=namespace, repository=respository)
1265511
def get_images(params = {})
      @log.trace "Listing images with params = #{params.to_json}..."
      data = JSON.parse(RestClient.get("#{url}/v1/images", :params => params))['images']
      @log.trace "Listing done."
      data
    end
1277206
def get_ladders_metadata(session, parsed):
    """"""
    ladders = {}
    for ladder in parsed.find_all('a', href=re.compile(LADDER_URL_REGEX)):
        ladders[ladder.text] = get_ladder_metadata(session, ladder['href'])
    return ladders
54192
public function processImageMeta($meta, $postID) {
		if (!$this->enabled()) {
			return $meta;
		}

        if (apply_filters('ilab_rekognition_enabled', false)) {
		    if (apply_filters('ilab_rekognition_detects_faces', false)) {
		        return $meta;
            }
        }

		if (!isset($meta['s3'])) {
			Logger::warning( "Post $postID is  missing 's3' metadata.", $meta);
			return $meta;
		}

		$url = $this->buildImgixImage($postID, 'full',['fm' => 'json','faces'=>1],false,null,null,$meta);
		if ($url && is_array($url)) {
			$jsonString = file_get_contents($url[0]);
			if (!empty($jsonString)) {
				$data = json_decode($jsonString, true);

				$pw = arrayPath($data,'PixelWidth',0);
				$ph = arrayPath($data,'PixelHeight',0);

				if (!empty($pw) && !empty($ph)) {
				    $facesData = arrayPath($data,'Faces',[]);
					$faces = [];
				    foreach($facesData as $face) {
					    $faces[] = [
						    'BoundingBox' => [
							    'Left' => floatval($face['bounds']['x']) / floatval($pw),
							    'Top' => floatval($face['bounds']['y']) / floatval($ph),
							    'Width' => floatval($face['bounds']['width']) / floatval($pw),
							    'Height' => floatval($face['bounds']['height']) / floatval($ph),
						    ]
					    ];
                    }

					if (count($faces)>0) {
						$meta['faces'] = $faces;
					}
                }
            }
		}

		return $meta;
	}
347760
function() {
        this._callbackId = "_callback_" + this.id.replace(/\./g, "_");
        // link the processMetadata method to the global scope and bind it
        // to this instance
        window[this._callbackId] = OpenLayers.Function.bind(
            OpenLayers.Layer.Bing.processMetadata, this
        );
        var params = OpenLayers.Util.applyDefaults({
            key: this.key,
            jsonp: this._callbackId,
            include: "ImageryProviders"
        }, this.metadataParams);
        var url = this.protocol + "//dev.virtualearth.net/REST/v1/Imagery/Metadata/" +
            this.type + "?" + OpenLayers.Util.getParameterString(params);
        var script = document.createElement("script");
        script.type = "text/javascript";
        script.src = url;
        script.id = this._callbackId;
        document.getElementsByTagName("head")[0].appendChild(script);
    }
345898
def imagej_metadata(self):
        """"""
        if not self.is_imagej:
            return None
        page = self.pages[0]
        result = imagej_description_metadata(page.is_imagej)
        if 'IJMetadata' in page.tags:
            try:
                result.update(page.tags['IJMetadata'].value)
            except Exception:
                pass
        return result
580174
def get(self):
        
        url = "{url_base}/resource/{pid}/scimeta/custom/".format(url_base=self.hs.url_base,
                                                                 pid=self.pid)
        r = self.hs._request('GET', url)
        return json.loads(r.text)
309278
@Override
    public ConnectionMetaData getMetaData() throws JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getMetaData");

        ConnectionMetaData connectionMetaData = null;
        try {
            connectionMetaData = jmsConnection.getMetaData();
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "getMetaData", new Object[] { connectionMetaData });
        }

        return connectionMetaData;
    }
597352
@Override
    public ManagedConnectionMetaData getMetaData() throws ResourceException {
        try {
            return new JcrManagedConnectionMetaData(mcf.getRepository(), session);
        } catch (Exception e) {
            throw new ResourceException(e);
        }
    }
1061655
def get_metadata(self, dataset_identifier, content_type="json"):
        '''
        
        '''
        resource = _format_old_api_request(dataid=dataset_identifier, content_type=content_type)
        return self._perform_request("get", resource)
978044
static public ImageryMetaDataResource getInstanceFromJSON(final String a_jsonContent) throws Exception
	{

		if(a_jsonContent==null) {
			throw new Exception("JSON to parse is null");
		}

		/// response code should be 200 and authorization should be valid (valid BingMap key)
		final JSONObject jsonResult = new JSONObject(a_jsonContent);
		final int statusCode = jsonResult.getInt(STATUS_CODE);
		if(statusCode!=200) {
			throw new Exception("Status code = "+statusCode);
		}

		if(AUTH_RESULT_CODE_VALID.compareToIgnoreCase(jsonResult.getString(AUTH_RESULT_CODE))!=0) {
			throw new Exception("authentication result code = "+jsonResult.getString(AUTH_RESULT_CODE));
		}

		// get first valid resource information
		final JSONArray resultsSet = jsonResult.getJSONArray(RESOURCE_SETS);
		if(resultsSet==null || resultsSet.length()<1) {
			throw new Exception("No results set found in json response");
		}

		if(resultsSet.getJSONObject(0).getInt(ESTIMATED_TOTAL)<=0) {
			throw new Exception("No resource found in json response");
		}

		final JSONObject resource = resultsSet.getJSONObject(0).getJSONArray(RESOURCE).getJSONObject(0);

		return ImageryMetaDataResource.getInstanceFromJSON(resource,jsonResult);
	}