Package org.odftoolkit.odfdom.pkg.rdfa
Class Util
- java.lang.Object
-
- org.odftoolkit.odfdom.pkg.rdfa.Util
-
public class Util extends Object
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getRDFBaseUri(String pkgBaseUri, String internalPath)
Get the RDF base uri of the given internalPath.static boolean
isSubPathOf(String subPath, String superPath)
To test whether the subPath is a sut path of superPathstatic boolean
qNameEquals(QName at, QName name)
Test whether two QNames are equal to each other.static String
toExternalForm(URI u)
To fix the 3 slashes bug for File URI: For example: file:/C:/work/test.txt -> file:///C:/work/test.txt
-
-
-
Method Detail
-
qNameEquals
public static boolean qNameEquals(QName at, QName name)
Test whether two QNames are equal to each other. This is a bug fix for java-rdfa library. "xhtml:about" and "about" should be considered as RDFa, while java-rdfa recognizes only the later one.- Parameters:
at
- , the QName of an Attributename
- , the QName to be compared- Returns:
-
getRDFBaseUri
public static String getRDFBaseUri(String pkgBaseUri, String internalPath)
Get the RDF base uri of the given internalPath. Note that there would be a SLASH at the end of the RDF base uri- Parameters:
pkgBaseUri
- , the base uri of the packageinternalPath
- , the internalPath relative to the root document- Returns:
-
isSubPathOf
public static boolean isSubPathOf(String subPath, String superPath)
To test whether the subPath is a sut path of superPath- Parameters:
subPath
- , an internal path in the ODF packagesuperPath
- , an internal path in the ODF package- Returns:
-
-