
org.integratedmodelling.kserver.controller.AuthorityController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of klab-server Show documentation
Show all versions of klab-server Show documentation
Spring controllers and common components for all k.LAB REST servers
The newest version!
package org.integratedmodelling.kserver.controller;
import org.integratedmodelling.api.knowledge.IAuthority;
import org.integratedmodelling.api.network.API;
import org.integratedmodelling.common.beans.authority.AuthorityConcept;
import org.integratedmodelling.common.beans.authority.AuthorityQueryResponse;
import org.integratedmodelling.common.vocabulary.authority.AuthorityFactory;
import org.integratedmodelling.exceptions.KlabException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
* Services to resolve and query authorities. These are public endpoints.
*
* @author Ferd
*
*/
@RestController
public class AuthorityController {
@RequestMapping(value = API.QUERY_AUTHORITY, method = RequestMethod.GET)
public AuthorityQueryResponse query(String authority, String query) throws KlabException {
IAuthority auth = AuthorityFactory.get().getAuthority(authority);
return null;
}
@RequestMapping(value = API.RESOLVE_AUTHORITY, method = RequestMethod.GET)
public AuthorityConcept identify(String authority, String id) throws KlabException {
IAuthority auth = AuthorityFactory.get().getAuthority(authority);
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy