|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.ucalgary.seahawk.util.HTMLUtils
public class HTMLUtils
Field Summary | |
---|---|
static String |
ACCEPTABLE_IMAGE_DATATYPE
|
static String |
BINARY_DATA_LABEL
|
Constructor Summary | |
---|---|
HTMLUtils()
|
Method Summary | |
---|---|
static String |
checkForHyperlinkText(String text)
Extracts a URL string from a given piece of text iof that's all it contains. |
static MobyContentInstance |
checkForMobyXML(String text)
Given an HTML fragment (e.g. cut'n'pasted from a browser), see if we unescape the HTML we get a MOBY XML block (e.g. from the biomoby.org web site examples). |
static URL |
checkForURLShortcut(File file)
Turns a file into a URL if the file was URL shortcut (Windows & Gnome). |
static String |
encapsulateBinaryData(URL sourceMobyData,
String html)
|
static String |
encapsulateBinaryData(URL sourceMobyData,
String html,
Registry registry)
|
static String |
getInputStreamContents(InputStream resourceStream)
Convenience method to grab all data from a input stream into a String. |
static byte[] |
getURLContentBytes(URL u)
Convenience method to grab all data from a URL as a byte array (in case it's not text) |
static String |
getURLContents(URL u)
Convenience method to grab all data from a URL into a String. |
static String |
htmlifyToolTipText(String text,
int maxLineLength)
By turning the tool tip text into HTML, we can make it multiline! |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String BINARY_DATA_LABEL
public static final String ACCEPTABLE_IMAGE_DATATYPE
Constructor Detail |
---|
public HTMLUtils()
Method Detail |
---|
public static String encapsulateBinaryData(URL sourceMobyData, String html) throws Exception
Exception
public static String encapsulateBinaryData(URL sourceMobyData, String html, Registry registry) throws Exception
Exception
public static String checkForHyperlinkText(String text)
public static URL checkForURLShortcut(File file) throws Exception
Exception
public static String htmlifyToolTipText(String text, int maxLineLength)
public static MobyContentInstance checkForMobyXML(String text)
public static String getURLContents(URL u) throws IOException
IOException
public static byte[] getURLContentBytes(URL u) throws IOException
IOException
public static String getInputStreamContents(InputStream resourceStream) throws IOException
IOException
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |