private Manifest getSPManifestFromXmlObject(XmlObject xmlObject) {
    XmlBeanManifestType serviceManifestType = (XmlBeanManifestType) xmlObject;

    XmlBeanServiceManifestDocument serviceManifestDoc =
        XmlBeanServiceManifestDocument.Factory.newInstance();
    serviceManifestDoc.addNewServiceManifest().set(serviceManifestType);

    return Manifest.Factory.newInstance(serviceManifestDoc);
  }
  public static XmlObject createResource(int type) throws ResourceTypeUnknown {

    switch (type) {
      case ManifestRegistryConstants.SERVICE_MANIFEST:

        //
        // generate blank service manifest document
        //
        XmlBeanServiceManifestDocument serviceManifestDoc =
            XmlBeanServiceManifestDocument.Factory.newInstance();
        return serviceManifestDoc;

      case ManifestRegistryConstants.PROVIDER_INFO:

        //
        // generate blank provider document
        //
        return null;

        // break;
      default:
        throw new ResourceTypeUnknown();
    }
  }
 @Override
 public ManifestImpl exportServiceManifest() {
   XmlBeanServiceManifestDocument doc = XmlBeanServiceManifestDocument.Factory.newInstance();
   doc.setServiceManifest(delegate.getServiceManifest());
   return new ManifestImpl(doc);
 }