if (jaxbElement==null) {
if (this.getPackage()==null) {
log.warn("This part not added to a package, so its contents can't be retrieved. " );
return null;
}
PartStore partStore = this.getPackage().getSourcePartStore();
if (partStore==null) {
log.warn("No PartStore defined for this package (it was probably created, not loaded). " );
log.warn(this.getPartName().getName() + ": did you initialise its contents to something?");
return null;
// or we could create it, with a bit of effort;
// as to which see http://stackoverflow.com/questions/1090458/instantiating-a-generic-class-in-java
}
try {
String name = this.getPartName().getName();
try {
if (partStore!=null) {
this.setContentLengthAsLoaded(
partStore.getPartSize( name.substring(1)));
}
} catch (UnsupportedOperationException uoe) {}
is = partStore.loadPart(
name.substring(1));
if (is==null) {
log.warn(name + " missing from part store");
} else {
log.info("Lazily unmarshalling " + name);