Creates an instance of the resource.
<!-- begin-user-doc -->
<!-- end-user-doc -->
@generated
347493
@Override
	public Resource createResource(URI uri) {
		XMLResource result = new BpsimResourceImpl(uri);
		result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
		result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);

		result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);

		result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
		result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);

		result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
		return result;
	}
275287
def create(self, resource, obj,
               operation_timeout=None, max_envelope_size=None, locale=None):
        
        if isinstance(resource, str):
            resource = ResourceLocator(resource)

        headers = self._build_headers(resource, Session.CreateAction,
                                      operation_timeout, max_envelope_size, locale)
        return self.service.invoke(headers, obj)
566666
@Override
  public DocumentDescriptor create(DocumentUriTemplate template, W contentHandle)
    throws ForbiddenUserException, FailedRequestException {
    return create(template, null, contentHandle, null, null, null, null, null);
  }
398418
public void createPackageContents() {
		if (isCreated) return;
		isCreated = true;

		// Create classes and their features
		documentRootEClass = createEClass(DOCUMENT_ROOT);
		createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
		createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
		createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
		createEReference(documentRootEClass, DOCUMENT_ROOT__GLOBAL);
		createEReference(documentRootEClass, DOCUMENT_ROOT__IMPORT);
		createEReference(documentRootEClass, DOCUMENT_ROOT__META_DATA);
		createEReference(documentRootEClass, DOCUMENT_ROOT__ON_ENTRY_SCRIPT);
		createEReference(documentRootEClass, DOCUMENT_ROOT__ON_EXIT_SCRIPT);
		createEAttribute(documentRootEClass, DOCUMENT_ROOT__PACKAGE_NAME);
		createEAttribute(documentRootEClass, DOCUMENT_ROOT__PRIORITY);
		createEAttribute(documentRootEClass, DOCUMENT_ROOT__RULE_FLOW_GROUP);
		createEAttribute(documentRootEClass, DOCUMENT_ROOT__TASK_NAME);
		createEAttribute(documentRootEClass, DOCUMENT_ROOT__VERSION);

		globalTypeEClass = createEClass(GLOBAL_TYPE);
		createEAttribute(globalTypeEClass, GLOBAL_TYPE__IDENTIFIER);
		createEAttribute(globalTypeEClass, GLOBAL_TYPE__TYPE);

		importTypeEClass = createEClass(IMPORT_TYPE);
		createEAttribute(importTypeEClass, IMPORT_TYPE__NAME);

		metaDataTypeEClass = createEClass(META_DATA_TYPE);
		createEAttribute(metaDataTypeEClass, META_DATA_TYPE__META_VALUE);
		createEAttribute(metaDataTypeEClass, META_DATA_TYPE__NAME);

		onEntryScriptTypeEClass = createEClass(ON_ENTRY_SCRIPT_TYPE);
		createEAttribute(onEntryScriptTypeEClass, ON_ENTRY_SCRIPT_TYPE__SCRIPT);
		createEAttribute(onEntryScriptTypeEClass, ON_ENTRY_SCRIPT_TYPE__SCRIPT_FORMAT);

		onExitScriptTypeEClass = createEClass(ON_EXIT_SCRIPT_TYPE);
		createEAttribute(onExitScriptTypeEClass, ON_EXIT_SCRIPT_TYPE__SCRIPT);
		createEAttribute(onExitScriptTypeEClass, ON_EXIT_SCRIPT_TYPE__SCRIPT_FORMAT);

		// Create data types
		packageNameTypeEDataType = createEDataType(PACKAGE_NAME_TYPE);
		priorityTypeEDataType = createEDataType(PRIORITY_TYPE);
		ruleFlowGroupTypeEDataType = createEDataType(RULE_FLOW_GROUP_TYPE);
		taskNameTypeEDataType = createEDataType(TASK_NAME_TYPE);
		versionTypeEDataType = createEDataType(VERSION_TYPE);
	}
677061
function createResource(url, params, methods) {
      var resource;

      params = _.defaults({}, params, defaultParams);
      methods = _.defaults({}, methods, defaultMethods);
      resource = $resource(url, params, methods);

      // overwrite $save to automatically call $create or $update
      resource.prototype.$save = function save() {
        if (!this._id) {
          return this.$create();
        }

        return this.$update();
      };

      return resource;
    }
1024323
def create(self, unique_name=values.unset, data=values.unset):
        
        data = values.of({'UniqueName': unique_name, 'Data': serialize.object(data), })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return DocumentInstance(self._version, payload, service_sid=self._solution['service_sid'], )
1263723
@Override
    public Resource createResource(String resourceName, String libraryName) {

        return getWrapped().createResource(resourceName, libraryName);

    }
1122329
@Create()
	public MethodOutcome createPatient(@ResourceParam Patient thePatient) {
		validateResource(thePatient);

		// Here we are just generating IDs sequentially
		long id = myNextId++;

		addNewVersion(thePatient, id);

		// Let the caller know the ID of the newly created resource
		return new MethodOutcome(new IdDt(id));
	}
1091198
public static DocumentBuilder createDocumentBuilder()
	{
		try
		{
			DocumentBuilderFactory factory = DOCUMENT_BUILDER_FACTORY.get();

			if (factory == null)
			{
				factory = createDocumentBuilderFactory();

				DOCUMENT_BUILDER_FACTORY = new SoftReference<>(factory);
			}

			return factory.newDocumentBuilder();
		}
		catch (ParserConfigurationException e)
		{
			throw new RuntimeException("Error creating DocumentBuilder: " + e.getMessage(), e);
		}
	}
602922
public Document.Projects.Project.Task.ResourceAssignments.ResourceAssignment createDocumentProjectsProjectTaskResourceAssignmentsResourceAssignment()
   {
      return new Document.Projects.Project.Task.ResourceAssignments.ResourceAssignment();
   }
290015
public function build(): SetEffectivePropertyValueForNodeRequest
	{
		$instance = new SetEffectivePropertyValueForNodeRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		if ($this->propertyName === null) {
			throw new BuilderException('Property [propertyName] is required.');
		}
		$instance->propertyName = $this->propertyName;
		if ($this->value === null) {
			throw new BuilderException('Property [value] is required.');
		}
		$instance->value = $this->value;
		return $instance;
	}
928784
public void createResource(final InputStream inputStream, final String resourceName)
        throws JaxRxException {
        synchronized (resourceName) {
            if (inputStream == null) {
                throw new JaxRxException(400, "Bad user request");
            } else {
                try {
                    shred(inputStream, resourceName);
                } catch (final TTException exce) {
                    throw new JaxRxException(exce);
                }
            }
        }
    }
960982
@SneakyThrows
    protected boolean createUserResource(final Principal p, final Credential credential) {
        val user = new UserResource(CoreSchema.USER_DESCRIPTOR);
        this.mapper.map(user, p, credential);
        return endpoint.create(user) != null;
    }
411066
public static DocTreeMaker instance(Context context) {
        DocTreeMaker instance = context.get(treeMakerKey);
        if (instance == null)
            instance = new DocTreeMaker(context);
        return instance;
    }
212984
public function build(): RequestNodeRequest
	{
		$instance = new RequestNodeRequest();
		if ($this->objectId === null) {
			throw new BuilderException('Property [objectId] is required.');
		}
		$instance->objectId = $this->objectId;
		return $instance;
	}
726705
public function create()
  {
    $class = ClassGen::classGen(
      $this->name,
      $this->namespace,
      [
        'Phrest\API\Enums\RequestMethodEnum',
        'Phrest\SDK\Request\AbstractRequest',
        'Phrest\SDK\Request\RequestOptions',
        'Phrest\SDK\PhrestSDK'
      ],
      'AbstractRequest'
    );

    // Path
    $path = '/' . $this->version . '/'
      . strtolower($this->entityName)
      . $this->getPlaceholderUriFromUrl($this->action->url);

    $property = ClassGen::property('path', 'private', $path, 'string');
    $class->addPropertyFromGenerator($property);

    // Properties and constructor parameters
    /** @var ParameterGenerator[] $parameters */
    $parameters = [];

    // Get properties
    $getParams = $this->generateGetParamsFromUrl($this->action->url);
    if (!empty($getParams))
    {
      foreach ($getParams as $getParam)
      {
        $class->addPropertyFromGenerator(
          ClassGen::property($getParam, 'public', null)
        );

        $parameter = new ParameterGenerator($getParam);
        $parameter->setDefaultValue(null);

        $parameters[$getParam] = $parameter;
      }
    }

    // Post properties
    if (!empty($this->action->postParams))
    {
      foreach ($this->action->postParams as $name => $type)
      {
        if ($class->hasProperty($name))
        {
          continue;
        }

        $class->addPropertyFromGenerator(
          ClassGen::property($name, 'public', null, $type)
        );

        $parameter = new ParameterGenerator($name, $type);
        $parameter->setDefaultValue(null);

        $parameters[$name] = $parameter;
      }
    }

    // Constructor
    if (!empty($parameters))
    {
      $constructor = ClassGen::constructor($parameters);
      $class->addMethodFromGenerator($constructor);
    }

    // Create method
    $create = ClassGen::method('create', [], 'public', $this->getCreateBody());
    $class->addMethodFromGenerator($create);

    // Setters
    foreach ($parameters as $parameter)
    {
      $class->addMethodFromGenerator(
        ClassGen::setter($parameter->getName(), $parameter->getType())
      );
    }

    return $class;
  }
803804
@Override
    public Object createResource(ResourceInfo info) throws Exception {
        Properties propertyNames = createPropertyNames();
        Properties props = createProperties(propertyNames);

        // The listOfPropMap is how the nested properties (name, value pairs) are
        // pulled from the Nester class. This iterates the map and stores them in the
        // props object
        if (listOfPropMap != null)
        {
            for (Map<String, Object> nestedProperties : listOfPropMap)
            {
                props.put(nestedProperties.get(NAME), nestedProperties.get(VALUE));
            }
        }

        Session session = createSession(props);

        return session;
    }