Package org.mycore.lod
Class MCRJerseyLodApp
java.lang.Object
jakarta.ws.rs.core.Application
org.glassfish.jersey.server.ResourceConfig
org.mycore.lod.MCRJerseyLodApp
- All Implemented Interfaces:
jakarta.ws.rs.core.Configurable<org.glassfish.jersey.server.ResourceConfig>
,jakarta.ws.rs.core.Configuration
,org.glassfish.jersey.ExtendedConfig
,org.glassfish.jersey.server.ServerConfig
@ApplicationPath("/open-data")
public class MCRJerseyLodApp
extends org.glassfish.jersey.server.ResourceConfig
Basic configuration for the MyCoRe Linked Open Data Endpoint
- Author:
- Robert Stephan
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String[]
read packages with Rest controllers and configurationprotected void
read name for the Jersey App from properties or generate a default onestatic jakarta.ws.rs.core.Response
returnLinkedData
(String rdfxmlString, URI uri, List<String> mimeTypes) create a Response object that contains the linked data in the given formatMethods inherited from class org.glassfish.jersey.server.ResourceConfig
addProperties, files, files, forApplication, forApplicationClass, forApplicationClass, getApplication, getApplicationName, getApplicationPath, getClasses, getClassLoader, getConfiguration, getContracts, getInstances, getProperties, getProperty, getPropertyNames, getResources, getRuntimeType, getSingletons, isEnabled, isEnabled, isProperty, isRegistered, isRegistered, packages, packages, packages, property, register, register, register, register, register, register, register, register, registerClasses, registerClasses, registerFinder, registerInstances, registerInstances, registerResources, registerResources, setApplicationName, setClassLoader, setProperties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.ws.rs.core.Configuration
hasProperty
-
Constructor Details
-
MCRJerseyLodApp
public MCRJerseyLodApp()Constructor
-
-
Method Details
-
initAppName
protected void initAppName()read name for the Jersey App from properties or generate a default one -
getRestPackages
read packages with Rest controllers and configuration- Returns:
- an array of package names
-
returnLinkedData
public static jakarta.ws.rs.core.Response returnLinkedData(String rdfxmlString, URI uri, List<String> mimeTypes) create a Response object that contains the linked data in the given format- Parameters:
rdfxmlString
- - the linked data as String in RDFXML formaturi
- - the base URI of the documentmimeTypes
- - the mime types, sent with the request- Returns:
- the Jersey Response with the requested Linked Data format
-