public final class PartName extends java.lang.Object implements java.lang.Comparable<PartName>
| Constructor and Description |
|---|
PartName(java.lang.String partName)
Constructor.
|
PartName(java.lang.String partName,
boolean checkConformance)
Constructor.
|
PartName(java.net.URI uri,
boolean checkConformance)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PartName otherPartName)
Compare two part name following the rule M1.12 :
Part name equivalence is determined by comparing part names as
case-insensitive ASCII strings.
|
boolean |
equals(java.lang.Object otherPartName)
Part name equivalence is determined by comparing part names as
case-insensitive ASCII strings.
|
static java.lang.String |
generateUniqueName(Base sourcePart,
java.lang.String proposedRelId,
java.lang.String directoryPrefix,
java.lang.String after_,
java.lang.String ext) |
java.lang.String |
getExtension()
Retrieves the extension of the part name if any.
|
java.lang.String |
getName()
Get this part name.
|
static java.lang.String |
getRelationshipsPartName(java.lang.String partName) |
java.net.URI |
getURI()
Part name property getter.
|
int |
hashCode() |
boolean |
isRelationshipPartURI()
To know if this part name is a relationship part name.
|
java.lang.String |
toString() |
public PartName(java.net.URI uri,
boolean checkConformance)
throws InvalidFormatException
uri - The URI to validate and to transform into ValidPartName.checkConformance - Flag to specify if the contructor have to validate the OPC
conformance. Must be always true except for
special URI like '/' which is needed for internal use by
OpenXML4J but is not valid.InvalidFormatException - Throw if the specified part name is not conform to Open
Packaging Convention specifications.URIpublic PartName(java.lang.String partName)
throws InvalidFormatException
partName - Part name to valid and to create.InvalidFormatException - Throw if the specified part name is not conform to Open
Packaging Convention specifications.public PartName(java.lang.String partName,
boolean checkConformance)
throws InvalidFormatException
partName - Part name to valid and to create.checkConformance - Flag to specify if the contructor have to validate the OPC
conformance. Must be always true except for
special URI like '/' which is needed for internal use by
OpenXML4J but is not valid.InvalidFormatException - Throw if the specified part name is not conform to Open
Packaging Convention specifications.public boolean isRelationshipPartURI()
true if this part name respect the relationship
part naming convention else false.public int compareTo(PartName otherPartName)
compareTo in interface java.lang.Comparable<PartName>public java.lang.String getExtension()
public java.lang.String getName()
public boolean equals(java.lang.Object otherPartName)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.net.URI getURI()
public static java.lang.String generateUniqueName(Base sourcePart, java.lang.String proposedRelId, java.lang.String directoryPrefix, java.lang.String after_, java.lang.String ext)
public static java.lang.String getRelationshipsPartName(java.lang.String partName)
for Wygwam's
implementation which I only found after writing thisCopyright © 2007–2023. All rights reserved.