Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • O OS Core Common
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 30
    • Issues 30
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Open Subsurface Data Universe Software
  • Platform
  • System
  • Lib
  • core
  • OS Core Common
  • Merge requests
  • !27

Add client factory and service lib for search and storage

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Hong Yan requested to merge search-storage-client into master Oct 07, 2020
  • Overview 14
  • Commits 6
  • Pipelines 13
  • Changes 20

Add client library for search service and storage service. It will not break any of our current pipeline.

Basic usage example

import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.opengroup.osdu.core.common.model.search.CursorQueryRequest;
import org.opengroup.osdu.core.common.model.storage.Schema;
import org.opengroup.osdu.core.common.search.ISearchService;
import org.opengroup.osdu.core.common.search.SearchAPIConfig;
import org.opengroup.osdu.core.common.search.SearchFactory;
import org.opengroup.osdu.core.common.storage.IStorageService;
import org.opengroup.osdu.core.common.storage.StorageAPIConfig;
import org.opengroup.osdu.core.common.storage.StorageFactory;

...

        DpsHeaders headers = new DpsHeaders();
        headers.put(DpsHeaders.DATA_PARTITION_ID, "partition");
        headers.put(DpsHeaders.AUTHORIZATION, "token");
        headers.addCorrelationIdIfMissing();
        
        // Search Service
        SearchFactory searchFactory = new SearchFactory(SearchAPIConfig.builder().rootUrl("search url").apiKey("search apikey").build());
        ISearchService searchService = searchFactory.create(headers);
        searchService.searchCursor(new CursorQueryRequest());
      
        // Storage Service
        StorageFactory storageFactory = new StorageFactory(StorageAPIConfig.builder().rootUrl("storage url").apiKey("storage apikey").build());
        IStorageService storageService = storageFactory.create(headers);
        Schema schema = storageService.getSchema("kind");
Edited Oct 08, 2020 by Hong Yan
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: search-storage-client