{@inheritdoc}

@throws LoadSiteMetadataException In case of error loading a site metadata file.
@throws InvalidSiteMetadataException In case of invalid site metadata format.
423493
public function load()
    {
        if ($this->fs->exists($this->filename) === false) {
            return;
        }

        try {
            $data = $this->fs->readFile($this->filename);
        } catch (\Exception $e) {
            $message = sprintf('Error loading the site metadata: %s', $e->getMessage());
            throw new LoadSiteMetadataException($message, 0, $e, $this->filename);
        }

        $this->metadata = json_decode($data, true);

        if (0 < $errorCode = json_last_error()) {
            $this->throwInvalidMetadataException($errorCode);
        }
    }
754659
public static function loadValidatorMetadata(ClassMetadata $metadata)
    {
        $metadata->addPropertyConstraint('ref', new Assert\Blank());

        $metadata->addPropertyConstraint('alert', new Assert\NotBlank());
        $metadata->addPropertyConstraint('alert', new Assert\Choice(array(
            'callback' => array('\WSColissimo\WSColiPosteLetterService\Request\ValueObject\Choice\AlertType', 'getChoices')
        )));

        $metadata->addPropertyConstraint('addressVO', new Assert\NotBlank());
        $metadata->addPropertyConstraint('addressVO', new Assert\Valid());
    }
15568
public void loadPath(final String sitePath, final AsyncCallback<CmsClientSitemapEntry> callback) {

        loadPath(sitePath, false, callback);
    }
474742
public static function loadApiMetadata(ApiMetadataDriver $metadata)
    {
        $metadata->setGroupPrefix('contactsource')
            ->addListProperties(
                [
                    'id',
                    'name',
                    'category',
                ]
            )
            ->addProperties(
                [
                    'description',
                    'descriptionPublic',
                    'utmSource',
                    'token',
                    'documentation',
                    'publishUp',
                    'publishDown',
                    'campaignList',
                ]
            )
            ->setGroupPrefix('contactsourceBasic')
            ->addListProperties(
                [
                    'id',
                    'name',
                    'category',
                    'description',
                    'descriptionPublic',
                    'utmSource',
                    'campaignList',
                ]
            )
            ->build();
    }
776500
public function validateMetadata(EventInterface $event) {
        $request = $event->getRequest();
        $metadata = $request->getContent();

        if (empty($metadata)) {
            throw new InvalidArgumentException('Missing JSON data', 400);
        } else {
            $metadata = json_decode($metadata, true);

            if ($metadata === null) {
                throw new InvalidArgumentException('Invalid JSON data', 400);
            }

            foreach (array_keys($metadata) as $key) {
                if (strpos($key, '.') === false) {
                    continue;
                }

                throw new InvalidArgumentException('Invalid metadata. Dot characters (\'.\') are not allowed in metadata keys', 400);
            }
        }
    }
527518
protected void processMetadataInitialization(HttpServletRequest request) throws ServletException {

        // In case the hosted IdP metadata weren't initialized, let's do it now
        if (manager.getHostedIdpName() == null) {

            synchronized (IdpMetadataManager.class) {

                if (manager.getHostedIdpName() == null) {

                    try {

                        log.info(
                                "No default metadata configured, generating with default values, please pre-configure metadata for production use");

                        // Defaults
                        String alias = generator.getEntityAlias();
                        String baseURL = getDefaultBaseURL(request);

                        // Use default baseURL if not set
                        if (generator.getEntityBaseURL() == null) {
                            log.warn(
                                    "Generated default entity base URL {} based on values in the first server request. Please set property entityBaseURL on MetadataGenerator bean to fixate the value.",
                                    baseURL);
                            generator.setEntityBaseURL(baseURL);
                        } else {
                            baseURL = generator.getEntityBaseURL();
                        }

                        // Use default entityID if not set
                        if (generator.getEntityId() == null) {
                            generator.setEntityId(getDefaultEntityID(baseURL, alias));
                        }

                        // Ensure supported nameID formats in uaa are listed in the metadata
                        Collection<String> supportedNameID = Arrays.asList(NameIDType.EMAIL, NameIDType.PERSISTENT,
                                NameIDType.UNSPECIFIED);
                        generator.setNameID(supportedNameID);

                        EntityDescriptor descriptor = generator.generateMetadata();
                        ExtendedMetadata extendedMetadata = generator.generateExtendedMetadata();

                        log.info("Created default metadata for system with entityID: " + descriptor.getEntityID());
                        MetadataMemoryProvider memoryProvider = new MetadataMemoryProvider(descriptor);
                        memoryProvider.initialize();
                        MetadataProvider metadataProvider = new ExtendedMetadataDelegate(memoryProvider,
                                extendedMetadata);

                        manager.addMetadataProvider(metadataProvider);
                        manager.setHostedIdpName(descriptor.getEntityID());
                        manager.refreshMetadata();

                    } catch (MetadataProviderException e) {
                        log.error("Error generating system metadata", e);
                        throw new ServletException("Error generating system metadata", e);
                    }

                }

            }

        }

    }
1280692
public function loadMetadataForClass($className, CommonClassMetadata $metadata)
    {
        try {
            $xmlRoot = $this->getElement($className);
        } catch (MappingException $exception) {
            throw new \InvalidArgumentException($metadata->name . ' is not a valid key-value-store entity.');
        }

        if ($xmlRoot->getName() != 'entity') {
            throw new \InvalidArgumentException($metadata->name . ' is not a valid key-value-store entity.');
        }

        $class = new \ReflectionClass($className);

        if (isset($xmlRoot['storage-name'])) {
            $metadata->storageName = $xmlRoot['storage-name'];
        }

        $ids = [];
        if (isset($xmlRoot->id)) {
            foreach ($xmlRoot->id as $id) {
                $ids[] = (string) $id;
            }
        }

        $transients = [];
        if (isset($xmlRoot->transient)) {
            foreach ($xmlRoot->transient as $transient) {
                $transients[] = (string) $transient;
            }
        }

        foreach ($class->getProperties() as $property) {
            if (in_array($property->getName(), $ids)) {
                $metadata->mapIdentifier($property->getName());

                continue;
            }

            if (in_array($property->getName(), $transients)) {
                $metadata->skipTransientField($property->getName());

                continue;
            }

            $metadata->mapField([
                'fieldName' => $property->getName(),
            ]);
        }
    }
198011
protected function doLoad($itemMetaData)
	{
		$query = $this->newQueryInstance($itemMetaData);
		$databaseMapping = $this->ormDriver->loadDatabaseMapping($itemMetaData);
		$query->mapDatabase($databaseMapping, $itemMetaData->getItemClass(), $itemMetaData->getHitPositions());
		return $query;
	}
879946
void readMeta() {
    final int check = buffer.getInt();
    if(check != MAGIC) {
      throw new AbortException("File does not start with expected magic.");
    }
    final int nummeta = buffer.getInt();
    assert (nummeta > 0) : "Empty bundle?";
    meta = new BundleMeta(nummeta);
    sers = new ByteBufferSerializer<?>[nummeta];
    data = new Object[nummeta];
    for(int i = 0; i < nummeta; i++) {
      try {
        @SuppressWarnings("unchecked")
        SimpleTypeInformation<? extends Object> type = (SimpleTypeInformation<? extends Object>) TypeInformationSerializer.STATIC.fromByteBuffer(buffer);
        sers[i] = type.getSerializer();
        if(i == 0 && DBID.class.isAssignableFrom(type.getRestrictionClass())) {
          hasids = true;
        }
        else {
          meta.add(type);
        }
      }
      catch(UnsupportedOperationException e) {
        throw new AbortException("Deserialization failed: " + e.getMessage(), e);
      }
      catch(IOException e) {
        throw new AbortException("IO error", e);
      }
    }
  }
1053680
public function loadClassMetadata(Mapping\ClassMetadataInterface $metadata)
    {
        
        $reflClass = $metadata->getReflectionClass();
        
        //Iterate over properties to get annotations
        foreach($reflClass->getProperties() as $property) {
            
            $this->readProperty($property, $metadata);
            
        }
        
    }
1189960
private void loadTable() {

        m_nullResult.setVisible(false);
        m_intro.setVisible(false);
        setVisible(true);
        m_siteTableFilter.setVisible(true);

        m_container.removeAllItems();

        setVisibleColumns(PROP_NAME, PROP_VARIATIONS);

        List<String> resources = HELPER.getAllCachedImages();

        for (String res : resources) {
            Item item = m_container.addItem(res);
            item.getItemProperty(PROP_NAME).setValue(res);
        }

        if (resources.size() == 0) {
            m_nullResult.setVisible(true);
            setVisible(false);
            m_siteTableFilter.setVisible(false);
        }

    }
408765
public function loadMetadataForClass($className, CommonClassMetadata $metadata)
    {
        /** @var \Doctrine\KeyValueStore\Mapping\ClassMetadata $metadata */
        try {
            $element = $this->getElement($className);
        } catch (MappingException $exception) {
            throw new \InvalidArgumentException($metadata->name . ' is not a valid key-value-store entity.');
        }

        $class = new \ReflectionClass($className);

        if (isset($element['storageName'])) {
            $metadata->storageName = $element['storageName'];
        }

        $ids = [];
        if (isset($element['id'])) {
            $ids = $element['id'];
        }

        $transients = [];
        if (isset($element['transient'])) {
            $transients = $element['transient'];
        }

        foreach ($class->getProperties() as $property) {
            if (in_array($property->getName(), $ids)) {
                $metadata->mapIdentifier($property->getName());

                continue;
            }

            if (in_array($property->getName(), $transients)) {
                $metadata->skipTransientField($property->getName());

                continue;
            }

            $metadata->mapField([
                'fieldName' => $property->getName(),
            ]);
        }
    }
1226395
public synchronized void load() throws IOException {
        XmlFile file = getConfigFile();
        if(file.exists()) {
            try {
                sites.replaceBy(((PersistedList)file.unmarshal(sites)).toList());
            } catch (IOException e) {
                LOGGER.log(Level.WARNING, "Failed to load "+file, e);
            }
            boolean defaultSiteExists = false;
            for (UpdateSite site : sites) {
                // replace the legacy site with the new site
                if (site.isLegacyDefault()) {
                    sites.remove(site);
                } else if (ID_DEFAULT.equals(site.getId())) {
                    defaultSiteExists = true;
                }
            }
            if (!defaultSiteExists) {
                sites.add(createDefaultUpdateSite());
            }
        } else {
            if (sites.isEmpty()) {
                // If there aren't already any UpdateSources, add the default one.
                // to maintain compatibility with existing UpdateCenterConfiguration, create the default one as specified by UpdateCenterConfiguration
                sites.add(createDefaultUpdateSite());
            }
        }
    }
356403
protected function loadCurrentSitemapIndex($filename)
    {
        if (!file_exists($filename)) {
            return array();
        }

        $urlsets = array();
        $index = simplexml_load_file($filename);
        foreach ($index->children() as $child) {
            /** @var $child \SimpleXMLElement */
            if ($child->getName() == 'sitemap') {
                if (!isset($child->loc)) {
                    throw new \InvalidArgumentException(
                        "One of referenced sitemaps in $filename doesn't contain 'loc' attribute"
                    );
                }
                $basename = preg_replace(
                    '/^' . preg_quote($this->sitemapFilePrefix) . '\.(.+)\.xml(?:\.gz)?$/',
                    '\1',
                    basename($child->loc)
                ); // cut .xml|.xml.gz

                if (!isset($child->lastmod)) {
                    throw new \InvalidArgumentException(
                        "One of referenced sitemaps in $filename doesn't contain 'lastmod' attribute"
                    );
                }
                $lastmod = new \DateTime($child->lastmod);
                $urlsets[$basename] = $this->newUrlset($basename, $lastmod);
            }
        }

        return $urlsets;
    }
1254286
public static function loadMetadata(DoctrineClassMetaData $metaData): void
    {
        try {
            self::getDoctrineStaticMeta()->setMetaData($metaData)->buildMetaData();
        } catch (\Exception $e) {
            throw new DoctrineStaticMetaException(
                'Exception in ' . __METHOD__ . ': ' . $e->getMessage(),
                $e->getCode(),
                $e
            );
        }
    }
1361449
protected function initMetadata() {
		if (! is_file($this->metadataPath)) {
			$this->metadata = [];
			
			return $this->metadata;
		}
		
		$metaRaw = file_get_contents($this->metadataPath);

		if ($metaRaw === false) {
			throw new Exceptions\MetadataError('Unable to read the metadata');
		}

		$meta = json_decode($metaRaw);

		if ($meta === null) {
			throw new Exceptions\MetadataError('Error in the metadata; Errorcode: ' . json_last_error());
		}

		$this->metadata = (array) $meta;

		return $this->metadata;
	}
1217531
private void loadDataFromInternet() throws IOException {
		URL url = new URL(DATA_RETRIVE_URL);
		InputStream is = url.openStream();
		try {
			PHPFileParser fp = new PHPFileParser(is);
			createInternalDataStructre(fp.getSections());
		} finally {
			is.close();
		}
	}