org.openjena.atlas.lib
Class IRILib

java.lang.Object
  extended by org.openjena.atlas.lib.IRILib

public class IRILib
extends Object

Operations related to IRIs


Constructor Summary
IRILib()
           
 
Method Summary
static boolean containsNonASCII(String string)
           
static String decode(String string)
           
static String encodeFileURL(String string)
          Encode using the rules for a file: URL.
static String encodeNonASCII(String string)
           
static String encodeUriComponent(String string)
          Encode using the rules for a component (e.g.
static String encodeUriPath(String uri)
          Encode using the rules for a path (e.g.
static String filenameToIRI(String fn)
          Create a string that is a IRI for the filename.
static String fileToIRI(File f)
          Return a string that is a IRI for the filename.
static String IRIToFilename(String iri)
          Convert an IRI to a filename
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IRILib

public IRILib()
Method Detail

encodeUriComponent

public static String encodeUriComponent(String string)
Encode using the rules for a component (e.g. ':' and '/' get encoded) Does not encode non-ASCII characters


encodeFileURL

public static String encodeFileURL(String string)
Encode using the rules for a file: URL. Same as encodeUriPath except add "~" to the encoded set. Does not encode non-ASCII characters


encodeUriPath

public static String encodeUriPath(String uri)
Encode using the rules for a path (e.g. ':' and '/' do not get encoded)


decode

public static String decode(String string)

fileToIRI

public static String fileToIRI(File f)
Return a string that is a IRI for the filename.


filenameToIRI

public static String filenameToIRI(String fn)
Create a string that is a IRI for the filename. Encode using the rules for a path (e.g. ':' and'/' do not get encoded)


IRIToFilename

public static String IRIToFilename(String iri)
Convert an IRI to a filename


encodeNonASCII

public static String encodeNonASCII(String string)

containsNonASCII

public static boolean containsNonASCII(String string)


Licenced under the Apache License, Version 2.0