public final class URIHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static PartName |
CORE_PROPERTIES_PART_NAME
Core properties partname.
|
static URI |
CORE_PROPERTIES_URI
Core properties part URI.
|
static char |
FORWARD_SLASH_CHAR
Forward slash URI separator.
|
static String |
FORWARD_SLASH_STRING
Forward slash URI separator.
|
static String |
PACKAGE_CORE_PROPERTIES_NAME
Core package properties art name.
|
static String |
PACKAGE_PROPERTIES_SEGMENT_NAME
Segment name of the package properties folder.
|
static PartName |
PACKAGE_RELATIONSHIPS_ROOT_PART_NAME
Package relationships part name.
|
static URI |
PACKAGE_RELATIONSHIPS_ROOT_URI
Package relationships part URI
|
static PartName |
PACKAGE_ROOT_PART_NAME
Root package part name.
|
static URI |
PACKAGE_ROOT_URI
Root package URI.
|
static String |
RELATIONSHIP_PART_EXTENSION_NAME
Extension name of a relationship part.
|
static String |
RELATIONSHIP_PART_SEGMENT_NAME
Segment name of a relationship part.
|
| Constructor and Description |
|---|
URIHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
combine(String prefix,
String suffix)
Combine a string URI with a prefix and a suffix.
|
static URI |
combine(URI prefix,
URI suffix)
Combine two URI.
|
static PartName |
createPartName(String partName)
Create an OPC compliant part name by throwing an exception if the
specified name is not valid.
|
static PartName |
createPartName(URI partUri)
Create an OPC compliant part name by throwing an exception if the URI is
not valid.
|
static String |
decodeURI(URI uri)
Decode a URI by converting all percent encoded character into a String
character.
|
static String |
getFilename(URI uri)
Get file name from the specified URI.
|
static String |
getFilenameWithoutExtension(URI uri)
Get the file name without the trailing extension.
|
static URI |
getPackageRootUri()
Gets the URI for the package root.
|
static URI |
getPath(URI uri)
Get the directory path from the specified URI.
|
static URI |
getSourcePartUriFromRelationshipPartUri(URI relationshipPartUri) |
static URI |
getURIFromPath(String path)
Get URI from a string path.
|
static boolean |
isValidPartName(URI partUri)
Validate a part URI by returning a boolean.
|
static URI |
relativizeURI(URI sourceURI,
URI targetURI)
Fully relativize the target part URI against the source part URI.
|
static URI |
resolvePartUri(URI sourcePartUri,
URI targetUri)
Resolve a target uri against a source.
|
public static final String RELATIONSHIP_PART_EXTENSION_NAME
public static final String RELATIONSHIP_PART_SEGMENT_NAME
public static final String PACKAGE_PROPERTIES_SEGMENT_NAME
public static final String PACKAGE_CORE_PROPERTIES_NAME
public static final char FORWARD_SLASH_CHAR
public static final String FORWARD_SLASH_STRING
public static final URI PACKAGE_RELATIONSHIPS_ROOT_URI
public static final PartName PACKAGE_RELATIONSHIPS_ROOT_PART_NAME
public static final URI CORE_PROPERTIES_URI
public static final PartName CORE_PROPERTIES_PART_NAME
public static final URI PACKAGE_ROOT_URI
public static final PartName PACKAGE_ROOT_PART_NAME
public static URI getPackageRootUri()
public static String getFilenameWithoutExtension(URI uri)
public static URI combine(URI prefix, URI suffix)
prefix - suffix - public static String combine(String prefix, String suffix)
public static URI relativizeURI(URI sourceURI, URI targetURI)
sourceURI - The source part URI.targetURI - The target part URI.null.public static URI resolvePartUri(URI sourcePartUri, URI targetUri)
sourcePartUri - The source URI.targetUri - The target URI.public static URI getSourcePartUriFromRelationshipPartUri(URI relationshipPartUri)
public static PartName createPartName(URI partUri) throws InvalidFormatException
partUri - The part name URI to validate.null.InvalidFormatException - Throws if the specified URI is not OPC compliant.public static PartName createPartName(String partName) throws InvalidFormatException
partName - The part name to validate.null.InvalidFormatException - Throws if the specified part name is not OPC compliant.createPartName(URI)public static boolean isValidPartName(URI partUri)
partUri - The URI to validate.createPartName(URI)Copyright © 2007-2022. All Rights Reserved.