Create and fill a new Entity Container

@param id Entity id
@return The container
351655
public EntityContainer newEntityContainer(String id) {
        final Entity e = lookupEntity(id);
        if (e == null) {
            return null;
        }
        e.setWeaks(weakEntities(e));
        return new EntityContainer(e);
    }
1145898
def build_from_id(id)
      @image = ::Docker::Image.get(id)
      add_repository_tag
    rescue ::Docker::Error::NotFoundError
      @image = ::Docker::Image.create('fromImage' => id)
      add_repository_tag
    rescue ::Docker::Error::DockerError => e
      DockerExceptionParser.new(e)
    end
378820
public static CmsUUID entityIdToUuid(String entityId) {

        if (entityId.startsWith(ENTITY_ID_PREFIX)) {
            entityId = entityId.substring(entityId.lastIndexOf("/") + 1);
        }
        return new CmsUUID(entityId);
    }
426249
protected Button newButton(final String id)
	{
		return new Button(id)
		{
			/** The serialVersionUID. */
			private static final long serialVersionUID = 1L;

			@Override
			public void onSubmit()
			{
				onSignup(ComponentFinder.findOrCreateNewAjaxRequestTarget(), getForm());
			}
		};
	}
208739
public Opinion newOpinion(String id) {
        idManager.updateCounter(AnnotationType.OPINION, id);
	Opinion newOpinion = new Opinion(id);
	annotationContainer.add(newOpinion, Layer.OPINIONS, AnnotationType.OPINION);
	return newOpinion;
    }
732744
@SuppressWarnings("unchecked")
  public <T extends CMAResource> T setId(String id) {
    getSystem().setId(id);
    return (T) this;
  }
672169
public static UserMentionEntity createUserMentionEntity(int start, int end, String name, String screenName,
                                                            long id) {
        return new UserMentionEntityJSONImpl(start, end, name, screenName, id);
    }
892220
@Override
    public T create(T entity) {
        EntityManager entityManager = getEntityManager();
        entityManager.persist(entity);
        return entity;
    }
915320
public ContainerCreate create(String imageId) {
		ContainerCreate command = new ContainerCreate();
		command.image(imageId);
		action.setCommand(command);
		return command;
	}
545811
public StoredObject getObject(String id) {
        if (id.contains("..") || id.contains("/") || id.contains("\\")) {
            throw Exceptions.createHandled()
                            .withSystemErrorMessage(
                                    "Invalid object name: %s. A object name must not contain '..' '/' or '\\'",
                                    id)
                            .handle();
        }
        return new StoredObject(new File(file, id));
    }
1184258
public DockerCLI createCliForContainer(String containerId) throws IOException, InterruptedException {
        LOG.trace("Creating cli for container {}.", containerId);
        final InspectContainerResponse inspect = getDockerCli().inspectContainerCmd(containerId).exec();
        return createCliForInspect(inspect);
    }
794992
protected function makeNewContainer()
    {
        $container = new Container();
        $container->classSet($this->entityClass);
        $container->setPropertyMapper( PropertyMapperEntityData::class );
        return $container;
    }
58112
void createContainer( String imageId ) throws TargetException {

		// Get the command to pass to the container
		this.logger.info( "Creating container " + this.machineId + " from image " + imageId );

		// Extract parameters as local variables
		Map<String,String> targetProperties = this.parameters.getTargetProperties();
		String applicationName = this.parameters.getApplicationName();
		String scopedInstancePath = this.parameters.getScopedInstancePath();

		// Deal with the Docker run options
		Map<String,String> options = new HashMap<> ();
		for( Map.Entry<String,String> entry : targetProperties.entrySet()) {
			if( entry.getKey().toLowerCase().startsWith( OPTION_PREFIX_RUN )) {
				String key = entry.getKey().substring( OPTION_PREFIX_RUN.length());
				options.put( key, entry.getValue());
			}
		}

		// Deal with environment variables (user)
		List<String> env = new ArrayList<> ();
		for( Map.Entry<String,String> entry : targetProperties.entrySet()) {
			if( entry.getKey().toLowerCase().startsWith( OPTION_PREFIX_ENV )) {

				String key = entry.getKey().substring( OPTION_PREFIX_ENV.length());
				String value = entry.getValue();

				value = value.replace( "<application-name>", applicationName );
				value = value.replace( "<scoped-instance-path>", scopedInstancePath );
				value = value.replace( "<scoped-messaging_type>", Utils.getValue(
						this.parameters.getMessagingProperties(),
						MessagingConstants.MESSAGING_TYPE_PROPERTY,
						"" ));

				env.add( key + "=" + value );
			}
		}

		// Deal with environment variables (default one: the Roboconf version)
		String rbcfVersion = DockerUtils.findDefaultImageVersion( ManifestUtils.findBundleVersion());
		env.add( "RBCF_VERSION=" + rbcfVersion );

		// Deal with environment variables (default one: the user data)
		env.add( "AGENT_PARAMETERS=file:" + USER_DATA_DIR + USER_DATA_FILE );

		// Execute...
		try {
			String containerName = DockerUtils.buildContainerNameFrom( scopedInstancePath, applicationName );

			// Create a volume
			File dir = new File( this.userDataVolume, containerName );
			Utils.createDirectory( dir );
			this.containerIdToVolume.put( containerName, dir );

			String userData = UserDataHelpers.writeUserDataAsString(
					this.parameters.getMessagingProperties(),
					this.parameters.getDomain(),
					this.parameters.getApplicationName(),
					this.parameters.getScopedInstancePath());

			Utils.writeStringInto( userData, new File( dir, USER_DATA_FILE ));
			Volume volume = new Volume( USER_DATA_DIR );
			Bind volumeBind = new Bind( dir.getAbsolutePath(), volume );

			// Create the container
			CreateContainerCmd cmd = this.dockerClient.createContainerCmd( imageId )
					.withName( containerName )
					.withEnv( env )
					.withVolumes( Arrays.asList( volume ))
					.withBinds( Arrays.asList( volumeBind ));

			DockerUtils.configureOptions( options, cmd );
			CreateContainerResponse container = cmd.exec();

			// Log warnings, if any
			if( container.getWarnings() != null
					&& container.getWarnings().length > 0
					&& this.logger.isLoggable( Level.FINE )) {

				StringBuilder sb = new StringBuilder();
				sb.append( "The following warnings have been found.\n" );
				for( String s : container.getWarnings())
					sb.append( s ).append( '\n' );

				this.logger.fine( sb.toString().trim());
			}

			// And start the container
			this.dockerClient.startContainerCmd( container.getId()).exec();

			// We're done here!
			this.logger.fine( "Container " + this.machineId + " was succesfully created as " + container.getId());

			// We replace the machine ID in the instance.
			// The configurator will be stopped anyway.
			this.parameters.getScopedInstance().data.put( Instance.MACHINE_ID, container.getId());

		} catch( Exception e ) {
			throw new TargetException( e );
		}
	}
675424
public static EntityDescriptor create(String id, ModelType type) {
        return create(ModelId.of(id), type);
    }
75950
function thng(id) {

    // To create nested Resources, the collection itself needs
    // a resource.
    if(!this.resource) {
      throw new Error('This Entity does not have a Resource.');
    }

    var path = this.resource.path + '/thngs';

    return Resource.constructorFactory(path, EVT.Entity.Thng)
      .call(this.resource.scope, id);
  }
236517
public static function prepareContainer($id)
	{
		// use array key exists so non existing column will researched
		if(array_key_exists('id', self::$container)) {
			return static::$container[$id];
		}

		$model = ColumnsetModel::findByPk($id);

		if($model === null)
		{
			static::$container[$id] = null;
			return null;
		}

		$sizes = deserialize($model->sizes, true);
		$container = array();

		foreach($sizes as $size)
		{
			$key = 'columnset_' . $size;
			$columns = deserialize($model->{$key}, true);

			foreach($columns as $index => $column) {
				if(isset($container[$index][0])) {
					$container[$index][0] .= ' ' . self::prepareSize($size, deserialize($column, true));
				}
				else {
					$container[$index][0] .= self::prepareSize($size, deserialize($column, true));
				}
			}
		}

		static::$container[$id] = $container;

		return $container;
	}
901677
public String addId(final URI id) {
        if (id == null) {
            return null;
        }
        final URI localId = id.normalize();
        index ++;
        final String newId = PREFIX + Integer.toString(index);
        idMap.put(localId, newId);
        return newId;
    }