Skip to main content

Add new types of collections

In this section, we will walk you through the process of setting up different types of collections for your organization. Go here to learn more about collections.

About types of collections

Use this feature to leverage different UI presentations for the different types of collections in your organization. For example, if you have a set of domain collections, glossary collections, and source collections, you will most likely have different sets of information you need to present to the users for each of these types of collections. This is when you will use the feature to create the different types of collections and corresponding UI presentations for the collection types.

collection_type03.png

STEP 1: Create different types of collections

  1. Use the following syntax to add different types for collections and add specific fields for each type of collection.

    ##create a new type of collection
    :Category a owl:Class ;
       rdfs:subClassOf dwec:Catalog ;
       rdfs:label "Category" ;
       label:plural "Categories" ;
    .
    ##add a custom field for the type
    :MetadataPresentation-CategoryManager
      rdf:type                dwec:MetadataPresentation ;
      rdfs:label              "Category Manager" ;
      dwec:inMetadataSection  :MetadataSectionInformational ;
      dwec:forType            :Category ;
      dwec:viaProperty        :manager ;
      rdf:type                dwec:Facetable ;
    .
    
    ##create a new type of collection
    :FiscalYear a owl:Class ;
       rdfs:subClassOf dwec:Catalog ;
       rdfs:label "Fiscal Year" ;
       label:plural "Fiscal Years" ;
    .
    ##add a custom field for the type
    :MetadataPresentation-TotalSales
      rdf:type                dwec:MetadataPresentation ;
      rdfs:label              "Total Sales" ;
      dwec:inMetadataSection  :MetadataSectionInformational ;
      dwec:forType            :FiscalYear ;
      dwec:viaProperty        :totalSales ;
    .
  2. Use the following syntax to add a bunch of collections for these new types.

    Note

    Note this is an optional syntax we are adding to create a richer example for this exercise. You can choose to not use this syntax and can alternatively add these collections from the UI.

    :Category-Books
      a                 :Category ;
      dct:identifier    "Books" ;
      :manager          "Kathleen Kelly";
    .
    :Category-Gifts
      a                 :Category ;
      dct:identifier    "Gifts" ;
      :manager          "Joe Fox";
    .
    :Category-CoffeeShop
      a                 :Category ;
      dct:identifier    "Coffee Shop" ;
      :manager          "Joe Fox";
    .
    
    :Category-Adult
      a                 :Category ;
      dct:identifier    "Adult Books" ;
    .
    :Category-AdultFiction
      a                 :Category ;
      dct:identifier    "Adult Fiction Books" ;
    .
    :Category-AdultNonFiction
      a                 :Category ;
      dct:identifier    "Adult Non-Fiction Books" ;
    .
    
    :Category-YA
      a                 :Category ;
      dct:identifier    "Young Adult Books" ;
      :manager          "Valerie Felicity Frizzle" ;
    .
    :Category-YAFiction
      a                 :Category ;
      dct:identifier    "Young Adult Fiction Books" ;
      :manager          "Valerie Felicity Frizzle" ;
    .
    :Category-YANonFiction
      a                 :Category ;
      dct:identifier    "Young Adult Non-Fiction Books" ;
      :manager          "Valerie Felicity Frizzle" ;
    .
    
    :Category-Kids
      a                 :Category ;
      dct:identifier    "Kids Books" ;
    .
    :Category-KidsInfant
      a                 :Category ;
      dct:identifier    "Kids Infant Books" ;
    .
    :Category-KidsElementary
      a                 :Category ;
      dct:identifier    "Kids Elementary Books" ;
    .
    
    :FiscalYear-2022
      a                 :FiscalYear ;
      dct:identifier    "FY 2022" ;
      :totalSales       "$100,000" ;
    .
    :FiscalYear-2021
      a                 :FiscalYear ;
      dct:identifier    "FY 2021" ;
    .
    :FiscalYear-2020
      a                 :FiscalYear ;
      dct:identifier    "FY 2020" ;
    .

    Note

    Further enhance the collections pageĀ with custom icons.

View the resultsšŸ„³

  1. Go to the Overview tab of the Organization profile page. You will notice two new types of collections - Categories and Fiscal Years.

    collection_type.png
  2. Browse to the FY 2022 collection you just added and you will notice the custom field on the Overview tab.

    collection_type02.png
  3. Click the New button to create a new collection. In the window, you will now see the option to create Categories and Fiscal Years types of collections.

    create_new_collection.png

STEP 2: Optional step for creating hierarchy of collections

Note

Note this is an optional syntax we are providing to create a richer example for this exercise. You can choose to not use this syntax and can alternatively add the hierarchy of collections from the UI.

  1. Use the following sample syntax to add a hierarchy of collection.

    :Category-Books
      a                 dwec:Catalog ;
      dct:identifier    "Books" ;
    .
    :Category-Gifts
      a                 dwec:Catalog ;
      dct:identifier    "Gifts" ;
    .
    :Category-CoffeeShop
      a                 dwec:Catalog ;
      dct:identifier    "Coffee Shop" ;
    .
    
    :Category-Adult
      a                 dwec:Catalog ;
      dct:identifier    "Adult Books" ;
      dwec:subCatalogOf :Category-Books ;
    .
    :Category-AdultFiction
      a                 dwec:Catalog ;
      dct:identifier    "Adult Fiction Books" ;
      dwec:subCatalogOf :Category-Adult ;
    .
    :Category-AdultNonFiction
      a                 dwec:Catalog ;
      dct:identifier    "Adult Non-Fiction Books" ;
      dwec:subCatalogOf :Category-Adult ;
    .
    
    :Category-YA
      a                 dwec:Catalog ;
      dct:identifier    "Young Adult Books" ;
      dwec:subCatalogOf :Category-Books ;
    .
    :Category-YAFiction
      a                 dwec:Catalog ;
      dct:identifier    "Young Adult Fiction Books" ;
      dwec:subCatalogOf :Category-YA ;
    .
    :Category-YANonFiction
      a                 dwec:Catalog ;
      dct:identifier    "Young Adult Non-Fiction Books" ;
      dwec:subCatalogOf :Category-YA ;
    .
    
    :Category-Kids
      a                 dwec:Catalog ;
      dct:identifier    "Kids Books" ;
      dwec:subCatalogOf :Category-Books ;
    .
    :Category-KidsInfant
      a                 dwec:Catalog ;
      dct:identifier    "Kids Infant Books" ;
      dwec:subCatalogOf :Category-Kids ;
    .
    :Category-KidsElementary
      a                 dwec:Catalog ;
      dct:identifier    "Kids Elementary Books" ;
      dwec:subCatalogOf :Category-Kids ;
    .

    To view the results, browse to the Adults book collection that you just added and on the collections page to view the hierarchy of collections associated with this collection.

    new_navigation02.gif
  2. Alternatively, use the following sample syntax to add both collection types and hierarchy of collections together.

    :Category a owl:Class ;
       rdfs:subClassOf dwec:Catalog ;
       rdfs:label "Category" ;
       label:plural "Categories" ;
    .
    :MetadataPresentation-CategoryManager
      rdf:type                dwec:MetadataPresentation ;
      rdfs:label              "Category Manager" ;
      dwec:inMetadataSection  :MetadataSectionInformational ;
      dwec:forType            :Category ;
      dwec:viaProperty        :manager ;
      rdf:type                dwec:Facetable ;
    .
    
    
    :FiscalYear a owl:Class ;
       rdfs:subClassOf dwec:Catalog ;
       rdfs:label "Fiscal Year" ;
       label:plural "Fiscal Years" ;
    .
    :MetadataPresentation-TotalSales
      rdf:type                dwec:MetadataPresentation ;
      rdfs:label              "Total Sales" ;
      dwec:inMetadataSection  :MetadataSectionInformational ;
      dwec:forType            :FiscalYear ;
      dwec:viaProperty        :totalSales ;
    .
    
    :QuarterlyReport a owl:Class ;
       rdfs:label "Quarterly Report" ;
       label:plural "Quarterly Reports" ;
    .
    
    :Category-Books
      a                 :Category ;
      dct:identifier    "Books" ;
      :manager          "Kathleen Kelly";
    .
    :Category-Gifts
      a                 :Category ;
      dct:identifier    "Gifts" ;
      :manager          "Joe Fox";
    .
    :Category-CoffeeShop
      a                 :Category ;
      dct:identifier    "Coffee Shop" ;
      :manager          "Joe Fox";
    .
    
    :Category-Adult
      a                 :Category ;
      dct:identifier    "Adult Books" ;
      dwec:subCatalogOf :Category-Books ;
    .
    :Category-AdultFiction
      a                 :Category ;
      dct:identifier    "Adult Fiction Books" ;
      dwec:subCatalogOf :Category-Adult ;
    .
    :Category-AdultNonFiction
      a                 :Category ;
      dct:identifier    "Adult Non-Fiction Books" ;
      dwec:subCatalogOf :Category-Adult ;
    .
    
    :Category-YA
      a                 :Category ;
      dct:identifier    "Young Adult Books" ;
      dwec:subCatalogOf :Category-Books ;
      :manager          "Valerie Felicity Frizzle" ;
    .
    :Category-YAFiction
      a                 :Category ;
      dct:identifier    "Young Adult Fiction Books" ;
      dwec:subCatalogOf :Category-YA ;
      :manager          "Valerie Felicity Frizzle" ;
    .
    :Category-YANonFiction
      a                 :Category ;
      dct:identifier    "Young Adult Non-Fiction Books" ;
      dwec:subCatalogOf :Category-YA ;
      :manager          "Valerie Felicity Frizzle" ;
    .
    
    :Category-Kids
      a                 :Category ;
      dct:identifier    "Kids Books" ;
      dwec:subCatalogOf :Category-Books ;
    .
    :Category-KidsInfant
      a                 :Category ;
      dct:identifier    "Kids Infant Books" ;
      dwec:subCatalogOf :Category-Kids ;
    .
    :Category-KidsElementary
      a                 :Category ;
      dct:identifier    "Kids Elementary Books" ;
      dwec:subCatalogOf :Category-Kids ;
    .
    
    :FiscalYear-2022
      a                 :FiscalYear ;
      dct:identifier    "FY 2022" ;
      :totalSales       "$100,000" ;
    .
    :FiscalYear-2021
      a                 :FiscalYear ;
      dct:identifier    "FY 2021" ;
    .
    :FiscalYear-2020
      a                 :FiscalYear ;
      dct:identifier    "FY 2020" ;
    .

    To view the results , go the Overview tab of the Organization profile page. You will notice two new types of collections - Categories and Fiscal Years with the collections that you added using the ttl file.

    collection_type.png

    Browse to the Adults book collection that you just added and on the Collection page to view the hierarchy of collections associated with this collection.