@Test public void addPackageDescrSamePkgUUID() { String pkgUUID = generateUUID(); PackageDescr toAdd = new PackageDescr(NAMESPACE); toAdd.setPreferredPkgUUID(pkgUUID); compositePackageDescr.addPackageDescr(new ByteArrayResource(), toAdd); assertTrue(compositePackageDescr.getPreferredPkgUUID().isPresent()); assertEquals(pkgUUID, compositePackageDescr.getPreferredPkgUUID().get()); toAdd = new PackageDescr(NAMESPACE); toAdd.setPreferredPkgUUID(pkgUUID); compositePackageDescr.addPackageDescr(new ByteArrayResource(), toAdd); assertEquals(pkgUUID, compositePackageDescr.getPreferredPkgUUID().get()); }
public void addPackageDescr(Resource resource, PackageDescr packageDescr) { if (!getNamespace().equals(packageDescr.getNamespace())) { throw new RuntimeException("Composing PackageDescr (" + packageDescr.getName() + ") in different namespaces (namespace=" + getNamespace() + " packageDescr=" + packageDescr.getNamespace() + ")" ); } internalAdd(resource, packageDescr); }
CompositePackageDescr extends PackageDescr { public void addPackageDescr(Resource resource, PackageDescr packageDescr) { if (!getNamespace().equals(packageDescr.getNamespace())) { throw new RuntimeException("Composing PackageDescr (" + packageDescr.getName() + ") in different namespaces (namespace=" + getNamespace() + " packageDescr=" + packageDescr.getNamespace() + ")" ); } internalAdd(resource, packageDescr); } }
CompositePackageDescr extends PackageDescr { public void addPackageDescr(Resource resource, PackageDescr packageDescr) { if (!getNamespace().equals(packageDescr.getNamespace())) { throw new RuntimeException("Composing PackageDescr (" + packageDescr.getName() + ") in different namespaces (namespace=" + getNamespace() + " packageDescr=" + packageDescr.getNamespace() + ")" ); } internalAdd(resource, packageDescr); } CompositePackageDescr();  CompositePackageDescr(Resource resource, PackageDescr packageDescr); }
CompositePackageDescr extends PackageDescr { public void addPackageDescr(Resource resource, PackageDescr packageDescr) { if (!getNamespace().equals(packageDescr.getNamespace())) { throw new RuntimeException("Composing PackageDescr (" + packageDescr.getName() + ") in different namespaces (namespace=" + getNamespace() + " packageDescr=" + packageDescr.getNamespace() + ")" ); } internalAdd(resource, packageDescr); } CompositePackageDescr();  CompositePackageDescr(Resource resource, PackageDescr packageDescr); void addPackageDescr(Resource resource, PackageDescr packageDescr); CompositeAssetFilter getFilter(); void addFilter( KnowledgeBuilderImpl.AssetFilter f ); }
CompositePackageDescr extends PackageDescr { public void addPackageDescr(Resource resource, PackageDescr packageDescr) { if (!getNamespace().equals(packageDescr.getNamespace())) { throw new RuntimeException("Composing PackageDescr (" + packageDescr.getName() + ") in different namespaces (namespace=" + getNamespace() + " packageDescr=" + packageDescr.getNamespace() + ")" ); } internalAdd(resource, packageDescr); } CompositePackageDescr();  CompositePackageDescr(Resource resource, PackageDescr packageDescr); void addPackageDescr(Resource resource, PackageDescr packageDescr); CompositeAssetFilter getFilter(); void addFilter( KnowledgeBuilderImpl.AssetFilter f );  }