Class: Mediaflux::ProjectCreateRequest

Inherits:
AssetCreateRequest show all
Defined in:
app/models/mediaflux/project_create_request.rb

Instance Attribute Summary collapse

Attributes inherited from AssetCreateRequest

#asset_name

Attributes inherited from Request

#session_token

Instance Method Summary collapse

Methods inherited from AssetCreateRequest

#id, service

Methods inherited from Request

build_post_request, default_xml_namespace, default_xml_namespace_uri, #error?, find_or_create_http_client, format_date_for_mediaflux, request_path, #resolve, #resolved?, #response_body, #response_error, #response_xml, service, uri, #xml_payload, #xtoshell_xml

Constructor Details

#initialize(session_token:, namespace:, project:, xml_namespace: nil, xml_namespace_uri: nil, pid: nil) ⇒ ProjectCreateRequest

Constructor

Parameters:

  • session_token (String)

    the API token for the authenticated session

  • namespace (String)

    Parent namespace for the asset to be created in

  • project (Project)

    project to be created in Mediaflux

  • pid (String) (defaults to: nil)

    Optional Parent collection id (use this or a namespace not both)

  • xml_namespace (String) (defaults to: nil)

    Optional parameter for metadata xml namspace

  • xml_namespace_uri (String) (defaults to: nil)

    Optional parameter for metadata xml namspace url



13
14
15
16
17
# File 'app/models/mediaflux/project_create_request.rb', line 13

def initialize(session_token:, namespace:, project:,  xml_namespace: nil, xml_namespace_uri: nil, pid: nil)
  super(session_token:, namespace:, name: project.project_directory_short,  xml_namespace:, xml_namespace_uri:,  pid:)
  @project = project
  @project_metadata = project.
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



4
5
6
# File 'app/models/mediaflux/project_create_request.rb', line 4

def collection
  @collection
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



4
5
6
# File 'app/models/mediaflux/project_create_request.rb', line 4

def namespace
  @namespace
end

#projectObject (readonly)

Returns the value of attribute project.



4
5
6
# File 'app/models/mediaflux/project_create_request.rb', line 4

def project
  @project
end

#project_metadataObject (readonly)

Returns the value of attribute project_metadata.



4
5
6
# File 'app/models/mediaflux/project_create_request.rb', line 4

def 
  @project_metadata
end