// A format consumer shall consider more than one core properties
// relationship for a package to be an error. If present, the
// relationship shall target the Core Properties part.
if (relationshipType.equals(PackageRelationshipTypes.CORE_PROPERTIES)
&& this.packageProperties != null)
throw new InvalidOperationException(
"OPC Compliance error [M4.1]: can't add another core properties part ! Use the built-in package method instead.");
/*
* Check rule M1.25: The Relationships part shall not have relationships
* to any other part. Package implementers shall enforce this
* requirement upon the attempt to create such a relationship and shall
* treat any such relationship as invalid.
*/
if (targetPartName.isRelationshipPartURI()) {
throw new InvalidOperationException(
"Rule M1.25: The Relationships part shall not have relationships to any other part.");
}
/* End OPC compliance */