public final class PartName extends Object implements Comparable<PartName>
Constructor and Description |
---|
PartName(String partName)
Constructor.
|
PartName(String partName,
boolean checkConformance)
Constructor.
|
PartName(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(Object otherPartName)
Part name equivalence is determined by comparing part names as
case-insensitive ASCII strings.
|
static String |
generateUniqueName(Base sourcePart,
String proposedRelId,
String directoryPrefix,
String after_,
String ext) |
String |
getExtension()
Retrieves the extension of the part name if any.
|
String |
getName()
Get this part name.
|
static String |
getRelationshipsPartName(String partName) |
URI |
getURI()
Part name property getter.
|
int |
hashCode() |
boolean |
isRelationshipPartURI()
To know if this part name is a relationship part name.
|
String |
toString() |
public PartName(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.URI
public PartName(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(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 Comparable<PartName>
public String getExtension()
public String getName()
public boolean equals(Object otherPartName)
public URI getURI()
public static String generateUniqueName(Base sourcePart, String proposedRelId, String directoryPrefix, String after_, String ext)
Copyright © 2007-2016. All Rights Reserved.