Skip to content

Commit

Permalink
Added a method to create BridgeDB Xref objects
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Jan 12, 2012
1 parent af5fd32 commit 6cb629e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Expand Up @@ -132,4 +132,8 @@ private Set<String> extractIdentifierStrings(Set<Xref> dests) {
results.add(dest.getURN());
return results;
}

public Xref xref(String identifier, String source) throws BioclipseException {
return new Xref(identifier, getSource(source));
}
}
Expand Up @@ -19,6 +19,7 @@
import net.bioclipse.managers.business.IBioclipseManager;

import org.bridgedb.DataSource;
import org.bridgedb.Xref;

@PublishedClass(
value="BridgeDB.org support.",
Expand Down Expand Up @@ -52,7 +53,8 @@ public interface IBridgedbManager extends IBioclipseManager {
@Recorded
@PublishedMethod(
methodSummary="Return a BioDataSource for the given string. It throws a BioclipseException when an" +
" unrecognized source String is passed.",
" unrecognized source String is passed. Use listAllSources() to" +
" get a list of source codes.",
params="String source"
)
public DataSource getSource(String source) throws BioclipseException;
Expand All @@ -70,4 +72,12 @@ public interface IBridgedbManager extends IBioclipseManager {
)
public Set<String> listAllSources();

@Recorded
@PublishedMethod(
methodSummary="Creates a BridgeBD Xref object from the given identifier and source. Use listAllSources() to" +
" get a list of source codes.",
params="String identifier, String source"
)
public Xref xref(String identifier, String source);

}

0 comments on commit 6cb629e

Please sign in to comment.