OMEKA Multiple Collections 플러그인 소개(아이템별 복수 컬렉션 선택 가능)

오메카에서 아이템을 어떤 컬렉션에 포함시킬 경우 기본적으로 한 개의 컬렉션만 선택할 수 있었습니다.
하지만 Multiple Collections 플러그인을 사용하면 아이템을 하나 이상의 컬렉션에 집어 넣을 수 있습니다.
이 플러그인은 오메카의 공식 플러그인은 아니지만 사용 방법이 어렵지 않고 특별히 문제될 만한 점이 없어서 사용하셔도 무방할 것으로 보입니다.
아래의 방법으로 설치해서 사용해 보시기 바랍니다.
한 가지 유의하실 점은 이 플러그인은 단독으로 구동이 불가능하고 Record Relations 플러그인이 설치되어 먼저 활성화되어 있어야 플러그인 설치 및 사용이 가능합니다.

Multiple Collections의 의존성 플러그인인 Record Relations는 다음과 같은 DB 필드를 갖고 있습니다.

id: primary key
subject_id: Omeka record id of the subject of the triple
property_id: id of the property in the RecordRelationsProperties table
object_id: Omeka record id of the object of the triple
subject_record_type: The model name of the subject Omeka record (e.g., Item, User)
object_record_type: The model name of the object Omeka record (e.g., Item, User)
timestamp: timestamp of when the relation was created (e.g., 2011-09-01 16:09:25 )
user_id: the user who created the relation
public: whether the relation is public

Multiple Collections 플러그인이 활성화되어 있는 경우 아이템이 컬렉션에 대해 일대일 선택에서 일대다 선택이 가능한 이유는 아래 소스코드 중 빨간색 라인에서 볼 수 있듯이 DCTerms Vocabulary의 "Is Part Of" terms를 사용해 아이템과 컬렉션의 관계를 재규정하는 property_id가 존재하기 때문입니다.
이를 통해 기존 오메카의 컬렉션 기능에는 없었던 아이템과 컬렉션의 새로운 관계가 만들어집니다.

공식 플러그인 중 Item Relations이 아이템과 아이템간의 관계를 규정했다면 Multiple Collections는 아이템과 컬렉션간의 관계를 규정한다고 생각하시면 이해가 쉬울 것 같습니다.

$props = array(
            'subject_record_type' => 'Item',
            'object_record_type' => 'Collection',
            'property_id' => record_relations_property_id(DCTERMS, 'isPartOf'),
            'public' => true
        );

foreach($items as $item) {
    $props['subject_id'] = $item->id;
    if(!is_null($item->collection_id) && $item->collection_id != 0) {
        $props['object_id'] = $item->collection_id;
        $relation = new RecordRelationsRelation();

        $relation->setProps($props);
        $relation->save();
    }  





# Multiple Collections 플러그인 설치 및 사용 방법

1. RecordRelations 플러그인 다운로드
https://github.com/omeka/plugin-RecordRelations/releases/download/v2.0.1/RecordRelations-2.0.1.zip


2. MultiCollections 플러그인 다운로드
https://github.com/omeka/plugin-MultiCollections/archive/master.zip


3. 각각의 zip 파일 압축 해제 후 웹서버의 플러그인 디렉토리(omeka/plugins/)에 업로드


4. 오메카 관리자 로그인 후 플러그인 메뉴로 이동


5. RecordRelations 및 Multiple Collections 플러그인 모두 활성화(Activate)


6. Multiple Collections 플러그인 Configure 버튼 클릭 후 체크박스 선택
   - Override regular "Collections" tab의 체크박스를 클릭한 후 저장 버튼 클릭


7. 아이템 편집 모드에서 우측의 컬렉션 선택 영역 중 원하는 컬렉션 복수 선택 후 저장

image


8. 컬렉션 보기 페이지에서 확인
image

image













1.PNG 106.8K
2.PNG 6.9K
3.PNG 7.2K
Sign In or Register to comment.