SynBioDex / libSBOLj

Java Library for Synthetic Biology Open Language (SBOL)
Apache License 2.0
38 stars 24 forks source link

Add support for Combinatorial Design #477

Closed cjmyers closed 6 years ago

cjmyers commented 7 years ago

See SEP #007

https://github.com/SynBioDex/SEPs/blob/master/sep_007.md

cjmyers commented 6 years ago

In general, methods that are get...URI() should return the URI, and get...() should return the Object.

@cjmyers These are the inconsistencies I've found while using the new classes. You know the library better than I do, so feel free to correct me if I'm wrong.

@IgorDurovic Please defer to Chris :)

cjmyers commented 6 years ago

I agree with most of these, except perhaps:

With createComponent, we don't have this option, so it would be okay to only have URI option. Granted, I see it is useful, so maybe in future we should add this option to all with references to a topLevel.

Same as last comment.

michael13162 commented 6 years ago

Another thing I found:

cjmyers commented 6 years ago

createCombinatorialDerivation should not take strategy, since it is an optional parameter.

cjmyers commented 6 years ago

I fixed the createCombinatorialDerivation and corresponding constructor.

michael13162 commented 6 years ago

Ah, I think I have found the culprit!

fromDoc.createRecursiveCopy(toDoc, derivation);

derivation has a variable component with variants. This derivation is contained within fromDoc. After the call, toDoc does indeed have the derivation and variable component, but the variable component doesn't have any variants anymore. I haven't checked if it preserves nested derivations or variant collections, but I would assume it's the same code path.

Once this is fixed, serialization should also be fixed (it may not have been the original problem, but Chris's fixes do seem to match better with the other objects).

cjmyers commented 6 years ago

Completed