Skip to content

glygener/glygen-drs-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

glygen-drs-client

DRS java client to test DRS server implementation

Add the following dependency to your project to use the client

    <dependency>
            <groupId>org.glygen</groupId>
            <artifactId>drsclient</artifactId>
            <version>1.0.0</version>
    </dependency>

The jar file is hosted in our Nexus repository:

    <repository>
            <id>nexus</id>
            <url>https://glygen.ccrc.uga.edu/repository/content/repositories/thirdparty/</url>
    </repository>

You can use the client as follows:

    DRSClient client = new DRSClientImpl();
    Object drsObject = client.getDrsObject("drs://glygen.ccrc.uga.edu/1671659988718");
    if (drsObject instanceof DrsObject) {
        DrsObject drs = (DrsObject) drsObject;
    } else {
        System.out.println(((DrsError)drsObject).getMsg());
    }
    
    Object accessURL = client.getAccessURL("drs://glygen.ccrc.uga.edu/1671659988718");
    if (accessURL instanceof AccessURL) {
        System.out.println ("Access URL: " + ((AccessURL)accessURL).getUrl());
    } else {
        System.out.println(((DrsError)accessURL).getMsg());
    }

About

DRS java client to test DRS server implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages