Package org.odftoolkit.odfdom.pkg.rdfa
Class Util
java.lang.Object
org.odftoolkit.odfdom.pkg.rdfa.Util
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
To fix the 3 slashes bug for File URI: For example: file:/C:/work/test.txt -> file:///C:/work/test.txt
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
qNameEquals
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
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
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:
-
toExternalForm
To fix the 3 slashes bug for File URI: For example: file:/C:/work/test.txt -> file:///C:/work/test.txt- Parameters:
u
- - the File URI- Returns:
- the String of the URI
-