Skip to content

noi-techpark/go-opendatahub-discoverswiss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenDataHub DiscoverSwiss Mapper

Overview

This repository contains the mapping structures and functions for transforming DiscoverSwiss data into the OpenDataHub content API ontology.

Purpose

The primary purpose of this repository is to:

  • Maintain mapping functions between DiscoverSwiss and OpenDataHub data structures
  • Define Go structs that represent the data models
  • Provide reusable mapping packages for the collector and transformers implementation

Structure

.
├── models/            # Data structures for both source and target schemas
│   ├── discover/      # DiscoverSwiss data models
│   │   └── accomodation.go
│   └── odh/          # OpenDataHub data models
│       └── new_model.go
├── mappers/          # Mapping functions
│   ├── lodgingmap.go
│   └── new_mapper.go
├── go.mod
├── go.sum
└── README.md

Usage

Import the required mapper packages in your collector implementation:

import (
    "github.com/noi-techpark/go-opendatahub-discoverwiss/mappers"
    "github.com/noi-techpark/go-opendatahub-discoverwiss/models"
)

Example mapping usage:

// Create a model
mapper := models.Accommodation{}

// Map DiscoverSwiss data to ODH format
odhData, err := mapper.MapAccommodation(discoverSwissData)
if err != nil {
    log.Fatal(err)
}

Related Projects

Contact

OpenDataHub Team - help@opendatahub.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages