org.odftoolkit.odfdom.pkg.rdfa
Class Util

java.lang.Object
  extended by org.odftoolkit.odfdom.pkg.rdfa.Util

public class Util
extends Object


Constructor Summary
Util()
           
 
Method Summary
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 superPath
static 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
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 Attribute
name - , 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 package
internalPath - , 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 package
superPath - , an internal path in the ODF package
Returns:

toExternalForm

public 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

Parameters:
u - - the File URI
Returns:
the String of the URI


Copyright © 2008-2017 The Apache Software Foundation. All Rights Reserved.