|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensolaris.opengrok.web.Util
public class Util
File for useful functions
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static java.lang.String |
breadcrumbPath(java.lang.String urlPrefix,
java.lang.String l)
|
static java.lang.String |
breadcrumbPath(java.lang.String urlPrefix,
java.lang.String l,
char sep)
|
static java.lang.String |
buildQueryString(java.lang.String freetext,
java.lang.String defs,
java.lang.String refs,
java.lang.String path,
java.lang.String hist)
Build a string that may be converted to a Query and passed to Lucene. |
static java.lang.String |
formQuoteEscape(java.lang.String q)
|
static void |
Htmlize(char[] cs,
int length,
java.lang.Appendable out)
|
static java.lang.String |
Htmlize(java.lang.CharSequence q)
Return a string which represents a CharSequence in HTML. |
static void |
Htmlize(java.lang.CharSequence q,
java.lang.Appendable out)
Append a character sequence to an Appendable object. |
static void |
Htmlize(java.lang.CharSequence q,
java.lang.StringBuilder out)
Append a character sequence to a StringBuilder
object. |
static void |
readableLine(int num,
java.io.Writer out,
Annotation annotation)
|
static java.lang.String |
redableSize(long num)
|
static java.lang.String |
uid(java.lang.String path,
java.lang.String date)
Append path and date into a string in such a way that lexicographic sorting gives the same results as a walk of the file hierarchy. |
static java.lang.String |
uid2url(java.lang.String uid)
|
static java.lang.String |
URIEncode(java.lang.String q)
|
static java.lang.String |
URIEncodePath(java.lang.String path)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static java.lang.String Htmlize(java.lang.CharSequence q)
CharSequence
in HTML.
q
- a character sequence
public static void Htmlize(java.lang.CharSequence q, java.lang.Appendable out) throws java.io.IOException
Appendable
object. Escape
special characters for HTML.
q
- a character sequenceout
- the object to append the character sequence to
java.io.IOException
- if an I/O error occurspublic static void Htmlize(java.lang.CharSequence q, java.lang.StringBuilder out)
StringBuilder
object. Escape special characters for HTML. This method is identical to
Htmlize(CharSequence,Appendable)
, except that it is
guaranteed not to throw IOException
because it uses a
StringBuilder
.
q
- a character sequenceout
- the object to append the character sequence toHtmlize(CharSequence, Appendable)
public static void Htmlize(char[] cs, int length, java.lang.Appendable out) throws java.io.IOException
java.io.IOException
public static java.lang.String breadcrumbPath(java.lang.String urlPrefix, java.lang.String l)
public static java.lang.String breadcrumbPath(java.lang.String urlPrefix, java.lang.String l, char sep)
public static java.lang.String redableSize(long num)
public static void readableLine(int num, java.io.Writer out, Annotation annotation) throws java.io.IOException
java.io.IOException
public static java.lang.String uid(java.lang.String path, java.lang.String date)
public static java.lang.String uid2url(java.lang.String uid)
public static java.lang.String URIEncode(java.lang.String q)
public static java.lang.String URIEncodePath(java.lang.String path)
public static java.lang.String formQuoteEscape(java.lang.String q)
public static java.lang.String buildQueryString(java.lang.String freetext, java.lang.String defs, java.lang.String refs, java.lang.String path, java.lang.String hist)
freetext
- The string from the "Full Search" text-field. This field
will be applied as it is specified.defs
- The string from the "Definition" text-field. This field
will be searched for in the defs field in the lucene
index. All occurences of ":" will be replaced with "\:"refs
- The string from the "Symbol" text-field. This field
will be searched for in the refs field in the lucene
index. All occurences of ":" will be replaced with "\:"path
- The string from the "File Path" text-field. This field
will be searched for in the path field in the lucene
index. All occurences of ":" will be replaced with "\:"hist
- The string from the "History" text-field. This field
will be searched for in the hist field in the lucene
index. All occurences of ":" will be replaced with "\:"
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |