public class ServletUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ServletUtils.GetInitParameter |
Constructor and Description |
---|
ServletUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addLoadedFrom(com.hp.hpl.jena.rdf.model.Model m,
String name) |
static boolean |
containsStar(String prefixPath) |
static String |
expandLocal(String baseFilePath,
String given,
String ifNull) |
static Set<String> |
getSpecNamesFromContext(ServletUtils.GetInitParameter f)
The spec names can come from the init parameter set in the web.xml,
or they may preferentially be set from system properties.
|
static boolean |
isSpecialName(String specPath) |
static void |
loadOneConfigFile(String appName,
ModelLoader ml,
String prefixPath,
String thisSpecPath) |
static void |
loadSpecsFromFiles(String appName,
ModelLoader ml,
String baseFilePath,
String prefixPath,
String specPath) |
static String |
nameToPrefix(String wildPrefix,
String specPath,
String name)
nameToPrefix matches the last segment of the pathname
specPath
against the leafname name and replaces any '*' character
in wildPrefix with the matched wildcard part(s) (joined
if necessary by the character '-') from the match, returning the
modified result. |
static void |
registerModel(String appName,
String prefixPath,
String filePath,
com.hp.hpl.jena.rdf.model.Model model)
Register all API endpoints specified in the given model with the
router.
|
static String[] |
safeSplit(String s) |
static void |
setupLARQandTDB(javax.servlet.ServletContext me) |
static void |
setUriTemplatePrefix(String prefixPath,
String filePath,
com.hp.hpl.jena.rdf.model.Resource root)
If the prefix path is not null, update the root to have a
uriTemplatePrefix derived from the prefix path by substituting
{file} with the leafname of the file loaded from and (b) {api}
with the local name of the root.
|
static Set<String> |
specNamesFromInitParam(ServletUtils.GetInitParameter f) |
static Set<String> |
specNamesFromSystemProperties() |
static String |
withTrailingSlash(String path) |
public static void setUriTemplatePrefix(String prefixPath, String filePath, com.hp.hpl.jena.rdf.model.Resource root)
public static void addLoadedFrom(com.hp.hpl.jena.rdf.model.Model m, String name)
public static void loadSpecsFromFiles(String appName, ModelLoader ml, String baseFilePath, String prefixPath, String specPath)
public static boolean containsStar(String prefixPath)
public static String nameToPrefix(String wildPrefix, String specPath, String name)
specPath
against the leafname name
and replaces any '*' character
in wildPrefix
with the matched wildcard part(s) (joined
if necessary by the character '-') from the match, returning the
modified result.public static boolean isSpecialName(String specPath)
public static void loadOneConfigFile(String appName, ModelLoader ml, String prefixPath, String thisSpecPath)
public static void registerModel(String appName, String prefixPath, String filePath, com.hp.hpl.jena.rdf.model.Model model)
model
- public static Set<String> specNamesFromInitParam(ServletUtils.GetInitParameter f)
public static Set<String> getSpecNamesFromContext(ServletUtils.GetInitParameter f)
public static void setupLARQandTDB(javax.servlet.ServletContext me)
Copyright © 2014. All Rights Reserved.