-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
663 additions
and
637 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 64 additions & 64 deletions
128
...a/org/integratedmodelling/klab/api/engine/distribution/impl/AbstractDistributionImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,64 @@ | ||
package org.integratedmodelling.klab.api.engine.distribution.impl; | ||
|
||
import org.integratedmodelling.klab.api.engine.distribution.Build; | ||
import org.integratedmodelling.klab.api.engine.distribution.Distribution; | ||
import org.integratedmodelling.klab.api.engine.distribution.Product; | ||
import org.integratedmodelling.klab.api.engine.distribution.RunningInstance; | ||
import org.integratedmodelling.klab.api.scope.Scope; | ||
import org.integratedmodelling.klab.api.utils.PropertyBean; | ||
|
||
import java.io.File; | ||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
|
||
/** | ||
* {@link Distribution} bean which implements all the properties and can be initialized from and saved to a | ||
* {@link java.util.Properties} object. Subclasses will need to define any further properties. | ||
*/ | ||
public abstract class AbstractDistributionImpl extends PropertyBean implements Distribution { | ||
|
||
private Collection<Product> products = new ArrayList<>(); | ||
|
||
@Override | ||
public Collection<Product> getProducts() { | ||
return products; | ||
} | ||
|
||
|
||
public AbstractDistributionImpl() { | ||
super(null); | ||
} | ||
|
||
public AbstractDistributionImpl(File file) { | ||
super(file); | ||
} | ||
|
||
@Override | ||
public Product findProduct(Product.ProductType productType) { | ||
for (var product : products) { | ||
if (product.getProductType() == productType) { | ||
return product; | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
/** | ||
* This is used by {@link LocalBuildImpl} so that we can run the build in more capable implementations by | ||
* just overriding this. | ||
* | ||
* @param build | ||
* @param scope | ||
* @return | ||
*/ | ||
public RunningInstance runBuild(Build build, Scope scope) { | ||
return null; | ||
} | ||
|
||
public RunningInstance getInstance(Build build, Scope scope) { | ||
return null; | ||
} | ||
|
||
|
||
|
||
} | ||
//package org.integratedmodelling.klab.api.engine.distribution.impl; | ||
// | ||
//import org.integratedmodelling.klab.api.engine.distribution.Build; | ||
//import org.integratedmodelling.klab.api.engine.distribution.Distribution; | ||
//import org.integratedmodelling.klab.api.engine.distribution.Product; | ||
//import org.integratedmodelling.klab.api.engine.distribution.RunningInstance; | ||
//import org.integratedmodelling.klab.api.scope.Scope; | ||
//import org.integratedmodelling.klab.api.utils.PropertyBean; | ||
// | ||
//import java.io.File; | ||
//import java.util.ArrayList; | ||
//import java.util.Collection; | ||
// | ||
///** | ||
// * {@link Distribution} bean which implements all the properties and can be initialized from and saved to a | ||
// * {@link java.util.Properties} object. Subclasses will need to define any further properties. | ||
// */ | ||
//public abstract class AbstractDistributionImpl extends PropertyBean implements Distribution { | ||
// | ||
// private Collection<Product> products = new ArrayList<>(); | ||
// | ||
// @Override | ||
// public Collection<Product> getProducts() { | ||
// return products; | ||
// } | ||
// | ||
// | ||
// public AbstractDistributionImpl() { | ||
// super(null); | ||
// } | ||
// | ||
// public AbstractDistributionImpl(File file) { | ||
// super(file); | ||
// } | ||
// | ||
// @Override | ||
// public Product findProduct(Product.ProductType productType) { | ||
// for (var product : products) { | ||
// if (product.getProductType() == productType) { | ||
// return product; | ||
// } | ||
// } | ||
// return null; | ||
// } | ||
// | ||
// /** | ||
// * This is used by {@link LocalBuildImpl} so that we can run the build in more capable implementations by | ||
// * just overriding this. | ||
// * | ||
// * @param build | ||
// * @param scope | ||
// * @return | ||
// */ | ||
// public RunningInstance runBuild(Build build, Scope scope) { | ||
// return null; | ||
// } | ||
// | ||
// public RunningInstance getInstance(Build build, Scope scope) { | ||
// return null; | ||
// } | ||
// | ||
// | ||
// | ||
//} |
Oops, something went wrong.