Put the entities that are not in a package in the selected package
17520
List<EntityType> putEntitiesInDefaultPackage(
      IntermediateParseResults intermediateResults, String defaultPackageId) {
    Package p = getPackage(intermediateResults, defaultPackageId);
    if (p == null) {
      throw new UnknownPackageException(defaultPackageId);
    }

    List<EntityType> entities = newArrayList();
    for (EntityType entityType : intermediateResults.getEntityTypes()) {
      if (entityType.getPackage() == null) {
        entityType.setId(defaultPackageId + PACKAGE_SEPARATOR + entityType.getId());
        entityType.setPackage(p);
      }
      entities.add(entityType);
    }
    return entities;
  }
840764
def merge(self, other):
        """"""
        if not getattr(other, '_catalog', None):
            return  # NullTranslations() has no _catalog
        if self._catalog is None:
            # Take plural and _info from first catalog found
            self.plural = other.plural
            self._info = other._info.copy()
            self._catalog = other._catalog.copy()
        else:
            self._catalog.update(other._catalog)
189513
def append(self, entity, name="pers"):
        
        e = map(lambda s: s.lower(), entity.split(" ") + [name])
        self.setdefault(e[0], []).append(e)
1145011
private Set<PackageRef> collectPackageDependencies() {
		Set<PackageRef> referencedPackages = new HashSet<PackageRef> ();
		for (TypeRef newReferencedType:importedReferencedTypes) {
			PackageRef packageRef = newReferencedType.getPackageRef();
			if (referencedPackages.contains(packageRef))			// package already known
				continue;
			referencedPackages.add(packageRef);
			System.out.println("Add package: " + packageRef.getFQN());
		}
		return referencedPackages;
	}
587466
def _get_entity_mods(bpe):
        """"""
        if _is_entity(bpe):
            features = bpe.getFeature().toArray()
        else:
            features = bpe.getEntityFeature().toArray()
        mods = []
        for feature in features:
            if not _is_modification(feature):
                continue
            mc = BiopaxProcessor._extract_mod_from_feature(feature)
            if mc is not None:
                mods.append(mc)
        return mods
404723
public function changePackageStatus(Request $request)
    {
        /**
         * @var $package \WellCommerce\Bundle\DistributionBundle\Entity\Package
         */
        $id         = $request->attributes->get('id');
        $em         = $this->getDoctrineHelper()->getEntityManager();
        $repository = $this->getRepository();
        $package    = $repository->find($id);
        
        if (null === $package) {
            throw new EntityNotFoundException($repository->getMetaData()->getName(), $id);
        }
        
        $this->setPackageVersions($package);
        
        $em->flush();
    }
1144804
function (items) {
        if (!config.ignoreDeprecatedPackages) {
          return items;
        }
        var list = _.filter(items, function (item) {
          // Ignore packages
          if (ignore.indexOf(item.name) !== -1) {
            return false;
          }
          // Limit to whitelisted packages
          if (whitelist[item.website] && item.name !== whitelist[item.website]) {
            return false;
          }
          return true;
        });
        return list;
      }
324810
private void parsePackagesSheet(
      Repository<Entity> repo, IntermediateParseResults intermediateResults) {
    if (repo == null) return;

    // Collect packages
    int rowIndex = 1;
    for (Entity packageEntity : resolvePackages(repo)) {
      rowIndex++;
      parseSinglePackage(intermediateResults, rowIndex, packageEntity);
    }
  }
179882
void validatePackage(EntityType entityType) {
    Package pack = entityType.getPackage();
    if (pack != null
        && isSystemPackage(pack)
        && !systemEntityTypeRegistry.hasSystemEntityType(entityType.getId())) {
      throw new MolgenisValidationException(
          new ConstraintViolation(
              format(
                  "Adding entity [%s] to system package [%s] is not allowed",
                  entityType.getId(), pack.getId())));
    }
  }
218445
def filter_installed_packages(packages):
    """"""
    cache = apt_cache()
    _pkgs = []
    for package in packages:
        try:
            p = cache[package]
            p.current_ver or _pkgs.append(package)
        except KeyError:
            log('Package {} has no installation candidate.'.format(package),
                level='WARNING')
            _pkgs.append(package)
    return _pkgs
1093588
def replace_built(self, built_packages):
    
    def map_packages(resolved_packages):
      packages = OrderedSet(built_packages.get(p, p) for p in resolved_packages.packages)
      return _ResolvedPackages(resolved_packages.resolvable, packages,
                               resolved_packages.parent, resolved_packages.constraint_only)

    return _ResolvableSet([map_packages(rp) for rp in self.__tuples])
933779
function(entities, options) {
      options = langx.mixin({}, options);
      var singular = !langx.isArray(entities);
      entities = singular ? [entities] : entities.slice();
      var removed = this._removeEntitys(entities, options);
      if (!options.silent && removed.length) {
        options.changes = {added: [], merged: [], removed: removed};
        this.trigger('update', this, options);
      }
      return singular ? removed[0] : removed;
    }
1062576
private void assignUniqueLabel(Package pack, Package targetPackage) {
    Set<String> existingLabels;
    if (targetPackage != null) {
      existingLabels = stream(targetPackage.getChildren()).map(Package::getLabel).collect(toSet());
    } else {
      existingLabels =
          dataService
              .query(PACKAGE, Package.class)
              .eq(PackageMetadata.PARENT, null)
              .findAll()
              .map(Package::getLabel)
              .collect(toSet());
    }
    pack.setLabel(generateUniqueLabel(pack.getLabel(), existingLabels));
  }
1148256
public function includePackagesViewsFunctions()
    {
        $_assets_package = Package::createFromAssetsLoader($this->assets_loader);
        foreach ($this->assets_loader->getAssetsDb() as $package=>$config) {
            if (!empty($config['views_functions'])) {
                $assets_package = clone $_assets_package;
                $assets_package->loadFromArray($config);
                foreach ($assets_package->getViewsFunctionsPaths() as $fcts) {
                    $fct_file = $assets_package->getFullPath($fcts);
                    if (@file_exists($fct_file)) {
                        @include_once $fct_file;
                    }
                }
            }
        }
    }
403032
def update(self, other):
    """"""
    if self._pants_workdir != other._pants_workdir:
      raise ValueError('Other ClasspathProducts from a different pants workdir {}'.format(other._pants_workdir))
    for target, products in other._classpaths._products_by_target.items():
      self._classpaths.add_for_target(target, products)
    for target, products in other._excludes._products_by_target.items():
      self._excludes.add_for_target(target, products)
1068194
def filter_package_list(package_list):
    
    remote_pkgs = []
    local_pkgs = []

    possible_remotes = filter(lambda i: not os.path.exists(i), package_list)
    juicer.utils.Log.log_debug("Considering %s possible remotes" % len(possible_remotes))

    for item in possible_remotes:
        remote_pkgs.extend(juicer.utils.Remotes.assemble_remotes(item))
    juicer.utils.Log.log_notice("Remote packages: %s" % str(remote_pkgs))

    possible_locals = filter(os.path.exists, package_list)
    possible_locals = filter(is_rpm, possible_locals)
    juicer.utils.Log.log_debug("Considering %s possible locals" % len(possible_locals))

    for item in possible_locals:
        for match in find_pattern(item):
            local_pkgs.append(match)
    juicer.utils.Log.log_notice("Local packages: %s" % str(local_pkgs))

    filtered_package_list = dedupe(remote_pkgs + local_pkgs)
    return filtered_package_list
1236396
private void updateEntityMappers() {
    for (Entry<Integer, EntitySchema> entry : schemaManager.getEntitySchemas(
        tableName, entityName).entrySet()) {
      if (!entityMappers.containsKey(entry.getKey())) {
        AvroEntitySchema writtenSchema = (AvroEntitySchema) entry.getValue();
        EntityMapper<ENTITY> entityMapper = constructWrappedEntityMapper(
            keySchema, entitySchema, writtenSchema, entityClass);
        entityMappers.put(entry.getKey(), entityMapper);
      }
    }
  }