Gets the repository definition of an repository specified by the given repository name.

@param repositoryName the given repository name (maybe with table name prefix)
@return repository definition, returns {@code null} if not found
514332
public static JSONObject getRepositoryDef(final String repositoryName) {
        if (StringUtils.isBlank(repositoryName)) {
            return null;
        }

        if (null == repositoriesDescription) {
            return null;
        }

        final JSONArray repositories = repositoriesDescription.optJSONArray("repositories");
        for (int i = 0; i < repositories.length(); i++) {
            final JSONObject repository = repositories.optJSONObject(i);
            if (repositoryName.equals(repository.optString("name"))) {
                return repository;
            }
        }

        throw new RuntimeException("Not found the repository [name=" + repositoryName + "] definition, please define it in repositories.json");
    }
891315
protected ItemData getCachedItemData(String identifier) throws RepositoryException
   {
      return cache.isEnabled() ? cache.get(identifier) : null;
   }
1052886
public NodeDefinitionData getChildNodeDefinition(final InternalQName nodeName, final InternalQName... nodeTypeNames)
      throws RepositoryException
   {
      return this.nodeTypeRepository.getDefaultChildNodeDefinition(nodeName, nodeTypeNames);
   }
922027
public String getRepository()
   {
      if (repository == null)
      {
         try
         {
            return repositoryService.getCurrentRepository().getConfiguration().getName();
         }
         catch (RepositoryException e)
         {
            throw new RuntimeException("Can not get current repository and repository name was not configured", e);
         }
      }
      else
      {
         return repository;
      }
   }
666702
@com.fasterxml.jackson.annotation.JsonProperty("repositoryName")
    public void setRepositoryName(String repositoryName) {
        this.repositoryName = repositoryName;
    }
1299093
public function getRepository($entityName)
    {
        $entityName = ltrim($entityName, '\\');
        if (isset($this->repositories[$entityName])) {
            return $this->repositories[$entityName];
        }

        $metadata = $this->getClassMetadata($entityName);
        $customRepositoryClassName = $metadata->customRepositoryClassName;

        if ($customRepositoryClassName !== null) {
            $repository = new $customRepositoryClassName($this, $metadata);
        } else {
            $repository = new XmlEntityRepository($this, $metadata);
        }

        $this->repositories[$entityName] = $repository;

        return $repository;
    }
864718
protected I_CmsCmisRepository getRepository(String repositoryId) {

        I_CmsCmisRepository result = OpenCms.getRepositoryManager().getRepository(
            repositoryId,
            I_CmsCmisRepository.class);
        if (result == null) {
            throw new CmisConnectionException("missing repository: " + repositoryId);
        }
        return result;
    }
507558
protected String getRepositoryName(String repoName) throws RepositoryException
   {
      // To be cloud compliant we need now to ignore the provided repository name (more details in JCR-2138)
      ManageableRepository repo = repositoryService.getCurrentRepository();
      String currentRepositoryName = repo.getConfiguration().getName();
      if (PropertyManager.isDevelopping() && log.isWarnEnabled())
      {
         if (!currentRepositoryName.equals(repoName))
         {
            log.warn("The expected repository was '" + repoName
               + "' but we will use the current repository instead which is '" + currentRepositoryName + "'");
         }
      }
      return currentRepositoryName;
   }
922051
public ConnectionRepository readConnectionRepository(String fileName)
    {
        try
        {
            RepositoryPersistor persistor = new RepositoryPersistor();
            return persistor.readConnectionRepository(fileName);
        }
        catch (Exception e)
        {
            throw new MetadataException("Can not read repository " + fileName, e);
        }
    }
855699
public String getSimpleName() {
        String prefix = user + "/";
        return repository.startsWith(prefix) ? repository.substring(prefix.length()) : repository;
    }
1307865
public Collection<HierarchicalProperty> getProperties(String name) throws RepositoryException
   {

      ArrayList<HierarchicalProperty> props = new ArrayList<HierarchicalProperty>();
      if ("jcr:primaryType".equals(name) || "jcr:mixinTypes".equals(name))
         return null;

      if (content != null && content.getProperty(name) != null)
      {
         props.addAll(content.getProperties(name));
      }

      try
      {
         String ns = ((ExtendedSession)node.getSession()).getLocationFactory().parseJCRName(name).getNamespace();
         Property p = node.getProperty(name);
         if (p.getDefinition().isMultiple())
         {
            Value[] v = p.getValues();
            for (int i = 0; i < v.length; i++)
            {
               props.add(new HierarchicalProperty(name, v[i].getString(), ns));
            }
         }
         else
         {
            props.add(new HierarchicalProperty(name, p.getString(), ns));
         }

         //      PropertyIterator iter = node.getProperties(name);
         //      while (iter.hasNext()) {
         //        Property prop = iter.nextProperty();
         //        props.add(new HierarchicalProperty(name, prop.getString(), ns));
         //      }
      }
      catch (PathNotFoundException e)
      {
         if (LOG.isTraceEnabled())
         {
            LOG.trace("An exception occurred: " + e.getMessage());
         }
      }
      return props;
   }
1334752
public ManageableRepository getRepository(String name) throws RepositoryException
   {
      RepositoryContainer repositoryContainer = repositoryContainers.get(name);
      log.debug("RepositoryServiceimpl() getRepository " + name);
      if (repositoryContainer == null)
      {
         throw new RepositoryException("Repository '" + name + "' not found.");
      }

      return (ManageableRepository)repositoryContainer.getComponentInstanceOfType(ManageableRepository.class);
   }
1191044
public PropertyDefinitionDatas getPropertyDefinitions(final InternalQName propertyName,
      final InternalQName... nodeTypeNames) throws RepositoryException
   {

      PropertyDefinitionDatas propertyDefinitions =
         this.nodeTypeRepository.getPropertyDefinitions(propertyName, nodeTypeNames);

      // Try super
      if (propertyDefinitions == null)
      {
         for (int i = 0; i < nodeTypeNames.length && propertyDefinitions == null; i++)
         {
            final InternalQName[] supers =
               this.nodeTypeRepository.getNodeType(nodeTypeNames[i]).getDeclaredSupertypeNames();
            propertyDefinitions = getPropertyDefinitions(propertyName, supers);

         }
      }

      // try residual def
      if (propertyDefinitions == null && !propertyName.equals(Constants.JCR_ANY_NAME))
      {
         propertyDefinitions = getPropertyDefinitions(Constants.JCR_ANY_NAME, nodeTypeNames);
      }

      return propertyDefinitions;
   }
316812
public static RepositoryId getRepository(final MavenProject project,
			final String owner, final String name) {
		// Use owner and name if specified
		if (!StringUtils.isEmpty(owner, name))
			return RepositoryId.create(owner, name);

		if (project == null)
			return null;

		RepositoryId repo = null;
		// Extract repository from SCM URLs first if present
		final Scm scm = project.getScm();
		if (scm != null) {
			repo = RepositoryId.createFromUrl(scm.getUrl());
			if (repo == null)
				repo = extractRepositoryFromScmUrl(scm.getConnection());
			if (repo == null)
				repo = extractRepositoryFromScmUrl(scm.getDeveloperConnection());
		}

		// Check project URL last
		if (repo == null)
			repo = RepositoryId.createFromUrl(project.getUrl());

		return repo;
	}
1031290
public DescriptorRepository readDescriptorRepository(String fileName)
    {
        try
        {
            RepositoryPersistor persistor = new RepositoryPersistor();
            return persistor.readDescriptorRepository(fileName);
        }
        catch (Exception e)
        {
            throw new MetadataException("Can not read repository " + fileName, e);
        }
    }
679522
public function getRepository($className = null){
      if($className === null){
        $repo = $this->getRepository(static::REPOSITORY_NAMESPACE);
      }else{
        $repo = $this->getEntityManager()->getRepository($className);
      }
      return $repo;
    }
509568
public JCRName parseJCRName(String name) throws RepositoryException
   {
      JCRPath path = parsePathEntry(JCRPath.createJCRPath(), name);
      JCRPath.PathElement entry = path.getName();
      return new JCRName(entry);
   }