Skip to content

Commit

Permalink
Merge pull request #402 from SynBioDex/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
cjmyers authored Oct 31, 2016
2 parents ea5d223 + 94d7074 commit edfcc04
Show file tree
Hide file tree
Showing 490 changed files with 593,343 additions and 578,201 deletions.
4 changes: 2 additions & 2 deletions core2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sbolstandard</groupId>
<artifactId>libSBOLj-parent</artifactId>
<version>2.1.0</version>
<version>2.1.1-SNAPSHOT</version>
</parent>

<artifactId>libSBOLj</artifactId>
Expand Down Expand Up @@ -126,5 +126,5 @@
</plugins>
</build>

<version>2.1.0</version>
<version>2.1.1-SNAPSHOT</version>
</project>
Binary file removed core2/src/main/java/org/sbolstandard/.DS_Store
Binary file not shown.
14 changes: 3 additions & 11 deletions core2/src/main/java/org/sbolstandard/core2/AccessType.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public enum AccessType {
PRIVATE("private");
private final String accessType;

AccessType(String accessType) {
private AccessType(String accessType) {
this.accessType = accessType;
}

Expand Down Expand Up @@ -64,19 +64,11 @@ else if (access.equals(AccessType.PRIVATE)) {
}
}

/**
* Returns the access type.
* @return access type.
*/
String getAccessType() {
return accessType;
}

@Override
public String toString() {
return accessType;
}

static final URI publicURI = URI.create(Sbol2Terms.sbol2.getNamespaceURI() + "public");
static final URI privateURI = URI.create(Sbol2Terms.sbol2.getNamespaceURI() + "private");
private static final URI publicURI = URI.create(Sbol2Terms.sbol2.getNamespaceURI() + "public");
private static final URI privateURI = URI.create(Sbol2Terms.sbol2.getNamespaceURI() + "private");
}
4 changes: 2 additions & 2 deletions core2/src/main/java/org/sbolstandard/core2/Annotation.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import uk.ac.ncl.intbio.core.datatree.NestedDocument;

/**
* Represents the SBOL Annotation data model.
* Represents an Annotation object in the cSBOL data model.
*
* @author Zhen Zhang
* @author Matthew Pocock
Expand Down Expand Up @@ -376,7 +376,7 @@ NamedProperty<QName> getValue() {
/**
* Sets the value of this Annotation instance to the specified argument.
*/
void setValue(NamedProperty<QName> value) {
private void setValue(NamedProperty<QName> value) {
this.value = value;
}

Expand Down
35 changes: 21 additions & 14 deletions core2/src/main/java/org/sbolstandard/core2/Collection.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.Set;

/**
* Represents the SBOL Collection data model.
* Represents an Collection object in the SBOL data model.
*
* @author Zhen Zhang
* @author Nicholas Roehner
Expand All @@ -19,6 +19,11 @@ public class Collection extends TopLevel{

private Set<URI> members;

/**
* @param identity
* @throws SBOLValidationException if an SBOL validation rule was violated in the following constructor:
* {@link TopLevel#TopLevel(URI)}.
*/
Collection(URI identity) throws SBOLValidationException {
super(identity);
this.members = new HashSet<>();
Expand All @@ -37,11 +42,16 @@ private Collection(Collection collection) throws SBOLValidationException {
//super(collection.getIdentity());
super(collection);
this.members = new HashSet<>();
Set<URI> newMembers = new HashSet<>();
for (URI member : collection.getMemberURIs()) {
newMembers.add(member);
this.addMember(member);
}
}

void copy(Collection collection) throws SBOLValidationException {
((TopLevel)this).copy((TopLevel)collection);
for (URI member : collection.getMemberURIs()) {
this.addMember(member);
}
this.setMembers(newMembers);
}

/**
Expand All @@ -54,8 +64,8 @@ private Collection(Collection collection) throws SBOLValidationException {
* @throws SBOLValidationException if the following SBOL validation rule was violated: 12103.
*/
public boolean addMember(URI memberURI) throws SBOLValidationException {
if (sbolDocument != null && sbolDocument.isComplete()) {
if (sbolDocument.getTopLevel(memberURI)==null) {
if (this.getSBOLDocument() != null && this.getSBOLDocument().isComplete()) {
if (this.getSBOLDocument().getTopLevel(memberURI)==null) {
throw new SBOLValidationException("sbol-12103", this);
}
}
Expand Down Expand Up @@ -106,7 +116,7 @@ public Set<URI> getMemberURIs() {
public Set<TopLevel> getMembers() {
Set<TopLevel> result = new HashSet<>();
for (URI memberURI : members) {
TopLevel member = sbolDocument.getTopLevel(memberURI);
TopLevel member = this.getDocument().getTopLevel(memberURI);
result.add(member);
}
return result;
Expand Down Expand Up @@ -169,7 +179,7 @@ public boolean equals(Object obj) {
* @throws SBOLValidationException if an SBOL validation rule violation occurred in {@link #Collection(Collection)}.
*/
@Override
protected Collection deepCopy() throws SBOLValidationException {
Collection deepCopy() throws SBOLValidationException {
return new Collection(this);
}

Expand Down Expand Up @@ -207,17 +217,14 @@ Collection copy(String URIprefix, String displayId, String version) throws SBOLV
* @see org.sbolstandard.core2.abstract_classes.TopLevel#checkDescendantsURIcompliance()
*/
@Override
protected void checkDescendantsURIcompliance() throws SBOLValidationException {
URIcompliance.isTopLevelURIformCompliant(this.getIdentity());
void checkDescendantsURIcompliance() {//throws SBOLValidationException {
//URIcompliance.isTopLevelURIformCompliant(this.getIdentity());
}

@Override
public String toString() {
return "Collection ["
+ "identity=" + identity
+ (this.isSetDisplayId()?", displayId=" + displayId:"")
+ (this.isSetName()?", name=" + name:"")
+ (this.isSetDescription()?", description=" + description:"")
+ super.toString()
+ (members.size()>0?", members=" + members:"")
+ "]";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,12 @@ public String toString()
}
}

public ComparableVersion( String version )
ComparableVersion( String version )
{
parseVersion( version );
}

public final void parseVersion( String version )
private final void parseVersion( String version )
{
this.value = version;

Expand Down
Loading

0 comments on commit edfcc04

Please sign in to comment.