public class Lib extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static com.hp.hpl.jena.rdf.model.impl.ModelCom |
dummy |
static Lib |
theLib
Singleton instance
|
| Constructor and Description |
|---|
Lib() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPlugin(String pluginname,
LibPlugin plugin) |
static com.hp.hpl.jena.rdf.model.RDFNode |
deserialize(String ser)
Decode a serlialized RDFNode, not associated with any useful model
|
String |
escapeHtml(String html)
HTML escape text
|
String |
escapeHtml(String html,
int limit)
HTML escape text and limit to N characters
|
LibPlugin |
get(String plugin) |
boolean |
isDatetime(Object node)
Test if a node is a date-time literal
|
String |
pageURL(javax.servlet.http.HttpServletRequest request,
int page)
Paging helper.
|
String |
pathDecode(String enc)
Decode query parameter or path segment that was %-encoded
|
String |
pathEncode(String orig)
Encode a string so it can be used in a query parameter or path segment safely.
|
String |
printDatetime(Object node)
Pretty print a datetime literal.
|
String[] |
regex(Object data,
String regex)
Match a string to a regex and return a vector of the matching groups
|
String |
replaceAll(Object data,
String regex,
String replacement)
Transform a string with a regex replacement
|
int |
safeInt(String lex,
int def)
Convert a string arg to an integer, returning the default
value if the parse failes
|
static String |
serialize(com.hp.hpl.jena.rdf.model.RDFNode node)
Serialize a (URI or literal) RDFNode to a string which can be later parsed
|
List<String> |
sortedKeys(Map<String,?> map)
Return a sorted list of the keys in a map
|
com.epimorphics.rdfutil.ModelWrapper |
wrap(com.hp.hpl.jena.rdf.model.Model model)
Wrap a Jena model as a ModelWrapper for ease of scripting
|
public static Lib theLib
protected static com.hp.hpl.jena.rdf.model.impl.ModelCom dummy
public String pathEncode(String orig)
public String pathDecode(String enc)
public int safeInt(String lex, int def)
public String[] regex(Object data, String regex)
public String escapeHtml(String html, int limit)
public String replaceAll(Object data, String regex, String replacement)
public List<String> sortedKeys(Map<String,?> map)
public static String serialize(com.hp.hpl.jena.rdf.model.RDFNode node)
public static com.hp.hpl.jena.rdf.model.RDFNode deserialize(String ser)
public String pageURL(javax.servlet.http.HttpServletRequest request, int page)
public boolean isDatetime(Object node)
public String printDatetime(Object node)
public com.epimorphics.rdfutil.ModelWrapper wrap(com.hp.hpl.jena.rdf.model.Model model)
Copyright © 2014. All rights reserved.