rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public static Object retrieveFromCache(String cacheName, Object key) { | public static Element retrieveFromCache(String cacheName, Object key) { | public static Object retrieveFromCache(String cacheName, Object key) { Cache cache = WikiCache.getCache(cacheName); Element element = cache.get(key); return (element == null) ? null : element.getObjectValue(); } |
Element element = cache.get(key); return (element == null) ? null : element.getObjectValue(); | return cache.get(key); | public static Object retrieveFromCache(String cacheName, Object key) { Cache cache = WikiCache.getCache(cacheName); Element element = cache.get(key); return (element == null) ? null : element.getObjectValue(); } |
request.setAttribute(WikiServlet.PARAMETER_ACTION, WikiServlet.ACTION_RECENT_CHANGES); request.setAttribute(WikiServlet.PARAMETER_SPECIAL, new Boolean(true)); | request.setAttribute(JAMController.PARAMETER_ACTION, JAMController.ACTION_RECENT_CHANGES); request.setAttribute(JAMController.PARAMETER_SPECIAL, new Boolean(true)); | private void recentChanges(HttpServletRequest request, ModelAndView next) throws Exception { String virtualWiki = JAMController.getVirtualWikiFromURI(request); next.addObject(JAMController.PARAMETER_TITLE, JAMController.getMessage("recentchanges.title", request.getLocale())); int num = Environment.getIntValue(Envir... |
TopicVersion topicVersion = WikiBase.getDataHandler().lookupTopicVersion(topicName, topicVersionId.intValue()); | TopicVersion topicVersion = WikiBase.getDataHandler().lookupTopicVersion(topicName, topicVersionId.intValue(), null); | private void edit(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo) throws Exception { String topicName = Utilities.getTopicFromRequest(request); String virtualWiki = Utilities.getVirtualWikiFromURI(request); Topic topic = loadTopic(virtualWiki, topicName); // topic name might be updated by loa... |
return (FormElementContext) getEnvironment().requireEntry(FormElementContext.class); | FormElementContext result; try { result = (FormElementContext)getEnvironment().requireEntry(FormElementContext.class); } catch (NoSuchEnvironmentEntryException e) { throw new FieldConstraintException(Assert.thisToString(this) + " could not determine FormElementContext, this is probably caused by applying field constrai... | protected FormElementContext getField() { if (field != null) return field; return (FormElementContext) getEnvironment().requireEntry(FormElementContext.class); } |
if (topic.getLockedBy() > 0) { stmt.setInt(5, topic.getLockedBy()); | if (topic.getLockedBy() != null) { stmt.setInt(5, topic.getLockedBy().intValue()); | protected void addTopic(Topic topic) throws Exception { int virtualWikiId = lookupVirtualWikiId(topic.getVirtualWiki()); Connection conn = null; PreparedStatement stmt = null; try { conn = DatabaseConnection.getConnection(); if (topic.getTopicId() <= 0) { // add WikiResultSet rs = DatabaseConnection.exec... |
if (topic.getLockedBy() > 0) { stmt.setInt(4, topic.getLockedBy()); | if (topic.getLockedBy() != null) { stmt.setInt(4, topic.getLockedBy().intValue()); | protected void addTopic(Topic topic) throws Exception { int virtualWikiId = lookupVirtualWikiId(topic.getVirtualWiki()); Connection conn = null; PreparedStatement stmt = null; try { conn = DatabaseConnection.getConnection(); if (topic.getTopicId() <= 0) { // add WikiResultSet rs = DatabaseConnection.exec... |
topic.setLockedBy(rs.getInt("topic_locked_by")); | int lockedBy = rs.getInt("topic_locked_by"); if (lockedBy > 0) topic.setLockedBy(new Integer(lockedBy)); | protected static Topic initTopic(WikiResultSet rs) { try { int virtualWikiId = rs.getInt("virtual_wiki_id"); String virtualWiki = lookupVirtualWikiName(virtualWikiId); Topic topic = new Topic(); topic.setAdminOnly(rs.getBoolean("topic_admin_only")); topic.setName(rs.getString("topic_name")); topic.setVirt... |
public WikiResultSet lookupWikiUser(int userId) throws Exception; | public WikiResultSet lookupWikiUser(int userId, Connection conn) throws Exception; | public WikiResultSet lookupWikiUser(int userId) throws Exception; |
String article = this.pageInfo.getTopicName(); String comments = "Comments:" + article; if (article != null && article.startsWith("Comments:")) { int pos = "Comments:".length(); article = article.substring(pos); comments = "Comments:" + article; } else if (article != null && article.startsWith("Special:")) { int pos = ... | if (!this.pageInfo.getSpecial()) { String article = this.pageInfo.getTopicName(); String comments = "Comments:" + article; if (article != null && article.startsWith("Comments:")) { int pos = "Comments:".length(); article = article.substring(pos); comments = "Comments:" + article; } else if (article != null && article.... | protected void loadDefaults(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo) { // load cached top area, nav bar, etc. try { this.buildLayout(request, next); } catch (Exception e) { logger.error("Unable to build default page layout", e); } // add link to user page and comments page WikiUs... |
next.addObject("article", article); next.addObject("comments", comments); | protected void loadDefaults(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo) { // load cached top area, nav bar, etc. try { this.buildLayout(request, next); } catch (Exception e) { logger.error("Unable to build default page layout", e); } // add link to user page and comments page WikiUs... | |
this.pageInfo = new WikiPageInfo(); | protected void viewError(HttpServletRequest request, ModelAndView next, Exception e) { logger.error("Servlet error", e); this.pageInfo.setPageTitle("System Error"); this.pageInfo.setPageAction(JAMWikiServlet.ACTION_ERROR); this.pageInfo.setSpecial(true); next.addObject("errorMessage", e.getMessage()); } | |
this.pageInfo = new WikiPageInfo(); | protected void viewLogin(HttpServletRequest request, ModelAndView next, String topic) throws Exception { String virtualWiki = JAMWikiServlet.getVirtualWikiFromURI(request); String redirect = request.getParameter("redirect"); if (!StringUtils.hasText(redirect)) { if (!StringUtils.hasText(topic)) { topic = Envir... | |
first = new MockEventfulStandardWidget(); second = new MockEventfulStandardWidget(); child.addWidget("first", first); first.addWidget("second", second); | public void setUp() throws Exception { child = new MockEventfulStandardWidget(); parent = new StandardContainerWidget(); parent.setRoot(child); MockLifeCycle.begin(parent); req = new MockHttpServletRequest(); res = new MockHttpServletResponse(); input = new StandardServletInputData(req); ... | |
String pathStr = "i.am.a.path.who.are.you"; | String pathStr = StandardContainerWidget.CHILD_KEY + ".first.second"; | public void testActionGetsCalled() throws Exception { String pathStr = "i.am.a.path.who.are.you"; req.addParameter(StandardContainerWidget.ACTION_PATH_KEY, pathStr); input = new StandardServletInputData(req); parent._getService().action(path, input, output); assertTrue(child.getActionCalled()); ... |
assertTrue(pathStr.equals(child.getPath().toString())); | assertTrue(first.getActionCalled()); assertTrue(second.getActionCalled()); | public void testActionGetsCalled() throws Exception { String pathStr = "i.am.a.path.who.are.you"; req.addParameter(StandardContainerWidget.ACTION_PATH_KEY, pathStr); input = new StandardServletInputData(req); parent._getService().action(path, input, output); assertTrue(child.getActionCalled()); ... |
String pathStr = "i.am.a.path.who.are.you"; | String pathStr = StandardContainerWidget.CHILD_KEY + ".first.second"; | public void testEventGetsCalled() throws Exception { String pathStr = "i.am.a.path.who.are.you"; req.addParameter(StandardContainerWidget.EVENT_PATH_KEY, pathStr); input = new StandardServletInputData(req); parent._getWidget().event(path, input); assertTrue(child.getEventProcessed()); assertTrue... |
assertTrue(pathStr.equals(child.getPath().toString())); | assertTrue(first.getEventProcessed()); assertTrue(second.getEventProcessed()); | public void testEventGetsCalled() throws Exception { String pathStr = "i.am.a.path.who.are.you"; req.addParameter(StandardContainerWidget.EVENT_PATH_KEY, pathStr); input = new StandardServletInputData(req); parent._getWidget().event(path, input); assertTrue(child.getEventProcessed()); assertTrue... |
upload(request, next); | upload(request, next, pageInfo); | public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) { ModelAndView next = new ModelAndView("wiki"); try { String contentType = ((request.getContentType() != null) ? request.getContentType().toLowerCase() : "" ); if (contentType.indexOf("multipart") != -1) { uplo... |
view(request, next); | view(request, next, pageInfo); | public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) { ModelAndView next = new ModelAndView("wiki"); try { String contentType = ((request.getContentType() != null) ? request.getContentType().toLowerCase() : "" ); if (contentType.indexOf("multipart") != -1) { uplo... |
viewError(request, next, e); | return viewError(request, e); | public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) { ModelAndView next = new ModelAndView("wiki"); try { String contentType = ((request.getContentType() != null) ? request.getContentType().toLowerCase() : "" ); if (contentType.indexOf("multipart") != -1) { uplo... |
loadDefaults(request, next, this.pageInfo); | loadDefaults(request, next, pageInfo); | public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) { ModelAndView next = new ModelAndView("wiki"); try { String contentType = ((request.getContentType() != null) ? request.getContentType().toLowerCase() : "" ); if (contentType.indexOf("multipart") != -1) { uplo... |
private void upload(HttpServletRequest request, ModelAndView next) throws Exception { | private void upload(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo) throws Exception { | private void upload(HttpServletRequest request, ModelAndView next) throws Exception { // FIXME - this method is a mess and needs to be split up. File file = new File(Environment.getValue(Environment.PROP_FILE_DIR_FULL_PATH)); if (!file.exists()) { throw new WikiException(new WikiMessage("upload.error.nodirectory"... |
viewTopic(request, next, topicName); | viewTopic(request, next, pageInfo, topicName); | private void upload(HttpServletRequest request, ModelAndView next) throws Exception { // FIXME - this method is a mess and needs to be split up. File file = new File(Environment.getValue(Environment.PROP_FILE_DIR_FULL_PATH)); if (!file.exists()) { throw new WikiException(new WikiMessage("upload.error.nodirectory"... |
private void view(HttpServletRequest request, ModelAndView next) throws Exception { this.pageInfo.setPageTitle(new WikiMessage("upload.title")); this.pageInfo.setPageAction(JAMWikiServlet.ACTION_UPLOAD); this.pageInfo.setSpecial(true); | private void view(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo) throws Exception { pageInfo.setPageTitle(new WikiMessage("upload.title")); pageInfo.setPageAction(JAMWikiServlet.ACTION_UPLOAD); pageInfo.setSpecial(true); | private void view(HttpServletRequest request, ModelAndView next) throws Exception { this.pageInfo.setPageTitle(new WikiMessage("upload.title")); this.pageInfo.setPageAction(JAMWikiServlet.ACTION_UPLOAD); this.pageInfo.setSpecial(true); } |
previewTopic.setName(topicName); | private void edit(HttpServletRequest request, ModelAndView next) throws Exception { request.getSession().setMaxInactiveInterval(60 * Environment.getIntValue(Environment.PROP_TOPIC_EDIT_TIME_OUT)); String topicName = JAMWikiServlet.getTopicFromRequest(request); if (!StringUtils.hasText(topicName)) { // FIXME - har... | |
public ViewSequence(Sequence seq) { this(seq, seq.getName()); | public ViewSequence(Sequence seq, String name) { this.name = name; seqDelegate = seq; addedFeatures = new SimpleFeatureHolder(); exposedFeatures = new MergeFeatureHolder(); try { exposedFeatures.addFeatureHolder(new ProjectedFeatureHolder( new ReparentContext(this, seqDelegate))); exposedFeatures.addFeatureHolder(adde... | public ViewSequence(Sequence seq) { this(seq, seq.getName()); } |
urn = seqDelegate.getURN(); if (urn.indexOf('?') >= 0) urn = urn + "&view=" + hashCode(); else urn = urn + "?view=" + hashCode(); anno = new OverlayAnnotation(seqDelegate.getAnnotation()); featureRealizer = FeatureImpl.DEFAULT; } | public ViewSequence(Sequence seq) { this(seq, seq.getName()); } | |
public ChangeType(String name, String className, String fieldName, ChangeType superType) { this.name = name; this.superType = superType; try { Class clazz = Class.forName(className); this.ourField = clazz.getField(fieldName); } catch (Exception ex) { throw new NestedError(ex, "Couldn't find class or field " + className... | public ChangeType(String name, Field ourField, ChangeType superType) { this.name = name; this.ourField = ourField; this.superType = superType; } | public ChangeType(String name, String className, String fieldName, ChangeType superType) { this.name = name; this.superType = superType; try { Class clazz = Class.forName(className); this.ourField = clazz.getField(fieldName); } catch (Exception ex) { throw new NestedError(ex, "Couldn't find class o... |
public ChangeEvent( Object source, ChangeType type, Object change, Object previous ) { this(source, type, change, null, null); | public ChangeEvent(Object source, ChangeType type) { this(source, type, null, null, null); | public ChangeEvent( Object source, ChangeType type, Object change, Object previous ) { this(source, type, change, null, null); } |
public IllegalIDException(String message) { super(message); | public IllegalIDException() { super(); | public IllegalIDException(String message) { super(message); } |
public MockServletRequest(String contextPath, String servletPath) { this.contextPath = contextPath; this.servletPath = servletPath; | public MockServletRequest() { | public MockServletRequest(String contextPath, String servletPath) { this.contextPath = contextPath; this.servletPath = servletPath; } |
Alphabet proteinT = ProteinTools.getTAlphabet(); | public void testSharedSymbols() throws Exception { Alphabet protein = ProteinTools.getAlphabet(); Alphabet proteinT = ProteinTools.getTAlphabet(); String protString = "RVQZ"; SymbolList sl_protein = new SimpleSymbolList( protein.getTokenization("token"), protString ); S... | |
throws IllegalSymbolException { try { org.biojava.bio.seq.io.SymbolTokenization p = getTAlphabet().getTokenization("token"); return new SimpleSymbolList(p, theProtein); } catch (BioException se) { throw new BioError("Something has gone badly wrong with Protein", se); } } | throws IllegalSymbolException { SymbolTokenization p = null; try { p = getTAlphabet().getTokenization("token"); } catch (BioException e) { throw new BioError("Something has gone badly wrong with Protein", e); } return new SimpleSymbolList(p, theProtein); } | public static SymbolList createProtein(String theProtein) throws IllegalSymbolException { try { org.biojava.bio.seq.io.SymbolTokenization p = getTAlphabet().getTokenization("token"); return new SimpleSymbolList(p, ... |
public ParseException(String message) { super(message); | public ParseException() { super(); | public ParseException(String message) { super(message); } |
template = new Feature.Template(); template.annotation = new SimpleAnnotation(); template.location = LocationTools.makeLocation(10, 15); | public void testEditFeatures() throws Exception { String name = "dna_1"; Sequence seq = DNATools.createDNASequence("atgctgatgatgatg", name); assertTrue(!mSequenceDB.ids().contains(name)); mSequenceDB.addSequence(seq); assertTrue(mSequenceDB.ids().contains(name)); seq = mSeq... | |
template.source = sourceType; | public void testEditFeatures() throws Exception { String name = "dna_1"; Sequence seq = DNATools.createDNASequence("atgctgatgatgatg", name); assertTrue(!mSequenceDB.ids().contains(name)); mSequenceDB.addSequence(seq); assertTrue(mSequenceDB.ids().contains(name)); seq = mSeq... | |
assertTrue(!noANNO.getAnnotation().containsProperty(annoTag)); | public void testEditFeatures() throws Exception { String name = "dna_1"; Sequence seq = DNATools.createDNASequence("atgctgatgatgatg", name); assertTrue(!mSequenceDB.ids().contains(name)); mSequenceDB.addSequence(seq); assertTrue(mSequenceDB.ids().contains(name)); seq = mSeq... | |
assertTrue("createFeature should copy rather than referencing annotation.", !noANNO.getAnnotation().containsProperty(annoTag)); | public void testEditFeatures() throws Exception { String name = "dna_1"; Sequence seq = DNATools.createDNASequence("atgctgatgatgatg", name); assertTrue(!mSequenceDB.ids().contains(name)); mSequenceDB.addSequence(seq); assertTrue(mSequenceDB.ids().contains(name)); seq = mSeq... | |
FeatureHolder filter(FeatureFilter filter); | FeatureHolder filter(FeatureFilter fc, boolean recurse); | FeatureHolder filter(FeatureFilter filter); |
boolean contains(int p); | boolean contains(Location l); | boolean contains(int p); |
private Integer getId() { return this.id; } | Integer getId() { return this.id; } | private Integer getId() { return this.id; } |
private void setAuthors(String authors) { this.authors = DocRefAuthor.Tools.parseAuthorString(authors); } | void setAuthors(String authors) { this.authors = DocRefAuthor.Tools.parseAuthorString(authors); } | private void setAuthors(String authors) { this.authors = DocRefAuthor.Tools.parseAuthorString(authors); } |
private void setCRC(String CRC) {} | void setCRC(String CRC) {} | private void setCRC(String CRC) {} // ignore as field is a calculated value |
private void setId(Integer id) { this.id = id; } | void setId(Integer id) { this.id = id; } | private void setId(Integer id) { this.id = id; } |
private void setLocation(String location) { this.location = location; } | void setLocation(String location) { this.location = location; } | private void setLocation(String location) { this.location = location; } |
private void setTitle(String title) { this.title = title; } | void setTitle(String title) { this.title = title; } | private void setTitle(String title) { this.title = title; } |
public static String generateAuthorString(Set authors) { | public static String generateAuthorString(List authors) { | public static String generateAuthorString(Set authors) { StringBuffer sb = new StringBuffer(); for (Iterator i = authors.iterator(); i.hasNext(); ) { DocRefAuthor a = (DocRefAuthor)i.next(); sb.append(a.getExtendedName()); if (i.hasNext()) sb.ap... |
public static Set parseAuthorString(String authors) { | public static List parseAuthorString(String authors) { | public static Set parseAuthorString(String authors) { if (authors==null) throw new IllegalArgumentException("Authors string cannot be null"); String[] parts = authors.split(","); Set authSet = new HashSet(); for (int i = 0; i < parts.length; i++) authSet.add(new Simpl... |
Set authSet = new HashSet(); | List authSet = new ArrayList(); | public static Set parseAuthorString(String authors) { if (authors==null) throw new IllegalArgumentException("Authors string cannot be null"); String[] parts = authors.split(","); Set authSet = new HashSet(); for (int i = 0; i < parts.length; i++) authSet.add(new Simpl... |
public SimpleDocRefAuthor(String s) { if (s==null) throw new IllegalArgumentException("Name cannot be null"); String[] parts = s.split("\\("); this.name = parts[0].trim(); if (parts.length>=3) { parts[1] = parts[1].trim(); parts[2] = parts[2].trim(); parts[1] = parts[1].substring(0,parts[1].length()-1); parts[2] = part... | public SimpleDocRefAuthor(String name, boolean consortium, boolean editor) { if (name==null) throw new IllegalArgumentException("Name cannot be null"); this.name = name; this.editor = editor; this.consortium = consortium; | public SimpleDocRefAuthor(String s) { if (s==null) throw new IllegalArgumentException("Name cannot be null"); String[] parts = s.split("\\("); this.name = parts[0].trim(); if (parts.length>=3) { parts[1] = parts[1].trim(); parts[2] = parts[2].trim(); part... |
List symbols, Set matches | List symbols | public SimpleBasisSymbol( char token, String name, Annotation annotation, List symbols, Set matches ) throws IllegalSymbolException { this(token, name, annotation); if(symbols == null) { throw new NullPointerException("symbols can't be null"); } if(symbols.size() == 0) { throw new Illegal... |
if(matches != null) { for(Iterator i = matches.iterator(); i.hasNext(); ) { Object obj = i.next(); if(obj instanceof AtomicSymbol) { } else { throw new ClassCastException( "Can't cast " + obj + " to AtomicSymbol" ); } } this.matches = new SimpleAlphabet(matches); } | public SimpleBasisSymbol( char token, String name, Annotation annotation, List symbols, Set matches ) throws IllegalSymbolException { this(token, name, annotation); if(symbols == null) { throw new NullPointerException("symbols can't be null"); } if(symbols.size() == 0) { throw new Illegal... | |
"\n\tmatches: " + this.matches + "\n\tbases: " + this.bases | "\n\tmatches: " + this.matches | public final List getSymbols() { if(symbols == null) { symbols = createSymbols(); } if(symbols.size() == 0) { throw new BioError( "Assertion Failure: symbols array is of length 0 in " + this + "\n\ttoken: " + getToken() + "\n\tname: " + getName() + "\n\tsymbols: " + this... |
public SimpleAlphabet(Set symbols) { this(symbols, null); | public SimpleAlphabet() { this(new HashSet(), null); | public SimpleAlphabet(Set symbols) { this(symbols, null); } |
Alphabet a = getMatches(); if (this instanceof BasisSymbol) { List l = ((BasisSymbol) this).getSymbols(); if (l.size() > 1) { StringBuffer sb = new StringBuffer(); sb.append('('); for (Iterator si = l.iterator(); si.hasNext(); ) { Symbol sym = (Symbol) si.next(); sb.append(sym.getName()); if (si.hasNext()) sb.append('... | if (this instanceof BasisSymbol) { List l = ((BasisSymbol) this).getSymbols(); if (l.size() > 1) { StringBuffer sb = new StringBuffer(); sb.append('('); Iterator si = l.iterator(); if(si.hasNext()) { Symbol sym = (Symbol) si.next(); sb.append(sym.getName()); } while(si.hasNext()) { Symbol sym = (Symbol) si.next(); sb.a... | public String getName() { Alphabet a = getMatches(); if (this instanceof BasisSymbol) { List l = ((BasisSymbol) this).getSymbols(); if (l.size() > 1) { StringBuffer sb = new StringBuffer(); sb.append('('); for (Iterator si = l.iterator(); si.hasNext(); ) { Symbol sym = (Symbol) si.next(); sb.ap... |
Alphabet a = getMatches(); if (a instanceof FiniteAlphabet) { FiniteAlphabet fa = (FiniteAlphabet) a; StringBuffer sb = new StringBuffer(); sb.append('['); Iterator si = fa.iterator(); if(si.hasNext()) { Symbol sym = (Symbol) si.next(); sb.append(sym.getName()); } while(si.hasNext()) { Symbol sym = (Symbol) si.next();... | public String getName() { Alphabet a = getMatches(); if (this instanceof BasisSymbol) { List l = ((BasisSymbol) this).getSymbols(); if (l.size() > 1) { StringBuffer sb = new StringBuffer(); sb.append('('); for (Iterator si = l.iterator(); si.hasNext(); ) { Symbol sym = (Symbol) si.next(); sb.ap... | |
return tags.get(oldTag); | Object newTag = tags.get(oldTag); if(newTag == null) { newTag = oldTag; } return newTag; | public Object getNewTag(Object oldTag) { return tags.get(oldTag); } |
StAXFeatureHandler(StAXFeatureHandler staxenv) { | StAXFeatureHandler() { | StAXFeatureHandler(StAXFeatureHandler staxenv) { handlers = new ArrayList(); this.staxenv = staxenv; this.listener = staxenv.listener; } |
this.staxenv = staxenv; this.listener = staxenv.listener; | StAXFeatureHandler(StAXFeatureHandler staxenv) { handlers = new ArrayList(); this.staxenv = staxenv; this.listener = staxenv.listener; } | |
SymbolStyle style = lCtxt.getStyle(); | public void paintLogo(LogoContext lCtxt) { Distribution dis = lCtxt.getDistribution(); SymbolStyle style = lCtxt.getStyle(); SymbolTokenization toke = null; try { toke = dis.getAlphabet().getTokenization("token"); } catch (BioException ex) { throw new BioRuntimeException(ex); } Rect... | |
double width = bounds.getWidth(); | public void paintLogo(LogoContext lCtxt) { Distribution dis = lCtxt.getDistribution(); SymbolStyle style = lCtxt.getStyle(); SymbolTokenization toke = null; try { toke = dis.getAlphabet().getTokenization("token"); } catch (BioException ex) { throw new BioRuntimeException(ex); } Rect... | |
double base = height; | public void paintLogo(LogoContext lCtxt) { Distribution dis = lCtxt.getDistribution(); SymbolStyle style = lCtxt.getStyle(); SymbolTokenization toke = null; try { toke = dis.getAlphabet().getTokenization("token"); } catch (BioException ex) { throw new BioRuntimeException(ex); } Rect... | |
throws IllegalResidueException, IOException; | throws SeqException, IllegalResidueException, IOException; | Sequence readSequence(StreamReader.Context context, ResidueParser resParser, SequenceFactory sf) throws IllegalResidueException, IOException; |
protected LazyFeatureHolder(FeatureFilter schema) { this.schema = schema; | protected LazyFeatureHolder() { | protected LazyFeatureHolder(FeatureFilter schema) { this.schema = schema; } |
stack = new Stack(); | this.stack = new Stack(); | public Indexer2(File file, IndexStore indexStore) throws FileNotFoundException { this.file = new RAF(file, "r"); this.reader = new CountedBufferedReader(new FileReader(file)); this.indexStore = indexStore; this.keys = new SmallMap(); this.keyValues = new SmallMap(); this.depth = 0; stack = new S... |
localSymbols = new OverlayMap(nameToSymbol); | public AlphabetHandler(String name, FiniteAlphabet parent) { this.name = name; localSymbols = new OverlayMap(nameToSymbol); alpha = new WellKnownAlphabet(); alpha.setName(name); alphaWrapper = new ImmutableWellKnownAlphabetWrap... | |
Symbol sym = (Symbol) i.next(); | WellKnownAtomicSymbol sym = (WellKnownAtomicSymbol) i.next(); | public AlphabetHandler(String name, FiniteAlphabet parent) { this.name = name; localSymbols = new OverlayMap(nameToSymbol); alpha = new WellKnownAlphabet(); alpha.setName(name); alphaWrapper = new ImmutableWellKnownAlphabetWrap... |
localSymbols.put(sym.getName(), sym); | lsidToSymbol.put(sym.getIdentifier(), sym); | public AlphabetHandler(String name, FiniteAlphabet parent) { this.name = name; localSymbols = new OverlayMap(nameToSymbol); alpha = new WellKnownAlphabet(); alpha.setName(name); alphaWrapper = new ImmutableWellKnownAlphabetWrap... |
String name = sh.getName(); | public void endElement(String nsURI, String localName, String qName, StAXContentHandler delegate) throws SAXException { if (delegate instanceof S... | |
localSymbols.put(name, symbol); | LifeScienceIdentifier lsid = sh.getLSID(); lsidToSymbol.put(lsid, symbol); | public void endElement(String nsURI, String localName, String qName, StAXContentHandler delegate) throws SAXException { if (delegate instanceof S... |
Symbol sym = (Symbol) localSymbols.get(name); | LifeScienceIdentifier lsid = null; try { lsid = LifeScienceIdentifier.valueOf(name); } catch (LifeScienceIdentifierParseException ex) { throw new SAXException("Couldn't form a LSID from "+name); } Symbol sym = (Symbol) lsidToSymbol.get(lsid); | public void startElement(String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm) throws SAXException ... |
dm.delegate(new CharacterTokenizationHandler(name, alphaWrapper, localSymbols, caseSensitive)); | dm.delegate(new CharacterTokenizationHandler(name, alphaWrapper, lsidToSymbol, caseSensitive)); | public void startElement(String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm) throws SAXException ... |
Symbol sym = (Symbol) localSymbols.get(name); | LifeScienceIdentifier lsid = null; try { lsid = LifeScienceIdentifier.valueOf(name); } catch (LifeScienceIdentifierParseException ex) { throw new SAXException("Cannot for LSID from " + name); } Symbol sym = (Symbol) localSymbols.get(lsid); | public void startElement(String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm) throws S... |
Symbol sym = (Symbol) i.next(); this.localSymbols.put(sym.getName(), sym); | WellKnownAtomicSymbol sym = (WellKnownAtomicSymbol) i.next(); this.localSymbols.put(sym.getIdentifier(), sym); | public CharacterTokenizationHandler(String name, FiniteAlphabet alpha, Map localSymbols, boolean caseSensitive) { this.name = name; ... |
public SymbolHandler(String name) { this.name = name; | public SymbolHandler(String id) { try { lsid = LifeScienceIdentifier.valueOf(id); name = lsid.getObjectId(); } catch (LifeScienceIdentifierParseException ex) { throw new BioError("Malformed LSID - "+name, ex); } | public SymbolHandler(String name) { this.name = name; } |
) ); | ), lsid ); | public void endTree() { symbol = new WellKnownAtomicSymbol( new FundamentalAtomicSymbol( name, annotation ) ); } |
String name = sh.getName(); | LifeScienceIdentifier lsid = sh.getLSID(); | public void endElement(String nsURI, String localName, String qName, StAXContentHandler delegate) throws SAXException { if (delegate instanceof SymbolHandler) { ... |
if (nameToSymbol.containsKey("name")) { throw new SAXException("There is already a top-level symbol named " + name); | if (lsidToSymbol.containsKey(lsid)) { throw new SAXException( "There is already a top-level symbol named " + lsid); | public void endElement(String nsURI, String localName, String qName, StAXContentHandler delegate) throws SAXException { if (delegate instanceof SymbolHandler) { ... |
nameToSymbol.put(name, symbol); | lsidToSymbol.put(lsid, symbol); | public void endElement(String nsURI, String localName, String qName, StAXContentHandler delegate) throws SAXException { if (delegate instanceof SymbolHandler) { ... |
WellKnownAtomicSymbol(AtomicSymbol symbol) { | WellKnownAtomicSymbol(AtomicSymbol symbol, LifeScienceIdentifier lsid) { | WellKnownAtomicSymbol(AtomicSymbol symbol) { super(symbol); } |
this.lsid = lsid; | WellKnownAtomicSymbol(AtomicSymbol symbol) { super(symbol); } | |
return new OPH(getName()); | return new OPH(getIdentifier()); | private Object writeReplace() { return new OPH(getName()); } |
Symbol s = (Symbol) nameToSymbol.get(name); | String ls = "urn:lsid:biojava.org:symbol:"+name; LifeScienceIdentifier lsid = null; try { lsid = LifeScienceIdentifier.valueOf(ls); } catch (LifeScienceIdentifierParseException ex) { throw new BioError("Cannot construct LSID for "+name, ex); } Symbol s = (Symbol) lsidToSymbol.get(lsid); | static public Symbol symbolForName(String name) throws NoSuchElementException { Symbol s = (Symbol) nameToSymbol.get(name); if(s == null) { throw new NoSuchElementException("Could not find symbol under the name " + name); } return s; } |
throw new NoSuchElementException("Could not find symbol under the name " + name); | throw new NoSuchElementException("Could not find symbol under the name " + lsid); | static public Symbol symbolForName(String name) throws NoSuchElementException { Symbol s = (Symbol) nameToSymbol.get(name); if(s == null) { throw new NoSuchElementException("Could not find symbol under the name " + name); } return s; } |
char token, String name, Annotation annotation ) { super(token, name, annotation); | char token, Annotation annotation, List symbols ) throws IllegalSymbolException { this(token, annotation); if(symbols == null) { throw new NullPointerException("symbols can't be null"); } if(symbols.size() == 0) { throw new IllegalSymbolException( "Can't create BasisSymbol for an empty list. Use the Gap symbol." ); } t... | protected SimpleBasisSymbol( char token, String name, Annotation annotation ) { super(token, name, annotation); } |
public void addChangeListener(ChangeListener cl, ChangeType ct) { getChangeSupport(ct).addChangeListener(cl, ct); | public void addChangeListener(ChangeListener cl) { getChangeSupport(ChangeType.UNKNOWN).addChangeListener(cl); | public void addChangeListener(ChangeListener cl, ChangeType ct) { getChangeSupport(ct).addChangeListener(cl, ct); } |
charactersToSymbols.put(chr, s); | if (!charactersToSymbols.containsKey(chr)) { charactersToSymbols.put(chr, s); } | public void bindSymbol(Symbol s, char c) { Character chr = new Character(c); if (!symbolsToCharacters.containsKey(s)) { symbolsToCharacters.put(s, chr); } charactersToSymbols.put(chr, s); tokenTable = null; } |
public FundamentalAtomicSymbol(String name, char token, Annotation annotation) | public FundamentalAtomicSymbol( String name, Annotation annotation) | public FundamentalAtomicSymbol(String name, char token, Annotation annotation) { this.name = name; this.token = token; this.annotation = annotation; } |
this.name = name; this.token = token; this.annotation = annotation; | this.name = name; this.annotation = annotation; | public FundamentalAtomicSymbol(String name, char token, Annotation annotation) { this.name = name; this.token = token; this.annotation = annotation; } |
public NameTokenization(FiniteAlphabet fab) { this(fab, false); | public NameTokenization(FiniteAlphabet fab, boolean caseSensitive) { super(fab); fab.addChangeListener(ChangeListener.ALWAYS_VETO, ChangeType.UNKNOWN); this.caseSensitive = caseSensitive; | public NameTokenization(FiniteAlphabet fab) { this(fab, false); } |
alpha.addChangeListener( indexBuilder = new IndexRebuilder(), Alphabet.SYMBOLS ); this.addChangeListener( adapter = new ChangeAdapter() { public void postChange(ChangeEvent ce) { symbols = (Symbol[] ) ce.getChange(); } }, AlphabetIndex.INDEX ); | public LinearAlphabetIndex(FiniteAlphabet alpha) { // lock the alphabet alpha.addChangeListener(ChangeListener.ALWAYS_VETO, Alphabet.SYMBOLS); this.alphaRef = new WeakReference(alpha); this.symbols = buildIndex(alpha); alpha.addChangeListener( indexBuilder = new IndexRebuilder(), Alphabet.SYM... | |
public IllegalAlphabetException(String message) { super(message); } | public IllegalAlphabetException() { super(); } | public IllegalAlphabetException(String message) { super(message); } |
public SimpleCrossProductAlphabet(List a, Alphabet parent) | public SimpleCrossProductAlphabet(List a) | public SimpleCrossProductAlphabet(List a, Alphabet parent) throws IllegalAlphabetException { this.parent = parent; for(Iterator i = a.iterator(); i.hasNext(); ) { Alphabet aa = (Alphabet) i.next(); if(! (aa instanceof FiniteAlphabet) ) { throw new IllegalAlphabetException( "Can't crea... |
this.parent = parent; for(Iterator i = a.iterator(); i.hasNext(); ) { Alphabet aa = (Alphabet) i.next(); if(! (aa instanceof FiniteAlphabet) ) { throw new IllegalAlphabetException( "Can't create a SimpleAlphabetManager over non-fininte alphabet " + aa.getName() + " of type " + aa.getClass() ); } } alphas = Collections.... | this(a, null); | public SimpleCrossProductAlphabet(List a, Alphabet parent) throws IllegalAlphabetException { this.parent = parent; for(Iterator i = a.iterator(); i.hasNext(); ) { Alphabet aa = (Alphabet) i.next(); if(! (aa instanceof FiniteAlphabet) ) { throw new IllegalAlphabetException( "Can't crea... |
private String getAlphabetName() { return (this.symList==SymbolList.EMPTY_LIST?null:this.symList.getAlphabet().getName()); } | private String getAlphabetName() { if (this.symList==SymbolList.EMPTY_LIST) return null; String name = this.symList.getAlphabet().getName(); if (name.equals(ProteinTools.getTAlphabet().getName())) return "protein"; else return name; } | private String getAlphabetName() { return (this.symList==SymbolList.EMPTY_LIST?null:this.symList.getAlphabet().getName()); } |
if (alphaname.equals("protein")) alphaname=ProteinTools.getTAlphabet().getName(); | private void setAlphabetName(String alphaname) throws IllegalSymbolException, BioException { this.alphaname = alphaname; this.checkMakeSequence(); } | |
FlatModel flat = new FlatModel(model); | FlatModel flat; if(model instanceof FlatModel) { flat = (FlatModel) model; } else { flat = new FlatModel(model); } | public static DP createDP(MarkovModel model) throws Exception { int heads = model.heads(); FlatModel flat = new FlatModel(model); if(heads == 1) { return new SingleDP(flat); } else if(heads == 2) { return new PairwiseDP(flat); } else { throw new UnsupportedOperationException( "Ca... |
throws IllegalResidueException, IllegalTransitionException { | throws IllegalResidueException, IllegalTransitionException, BioException { | public SingleDP(MarkovModel flat) throws IllegalResidueException, IllegalTransitionException { super(flat); } |
"Sublist index out of bounds " + length() + ":" + start + "," + send | "Sublist index out of bounds " + length() + ":" + sstart + "," + send | public SymbolList subList(int sstart, int send) { if (sstart < 1 || send > length()) { throw new IndexOutOfBoundsException( "Sublist index out of bounds " + length() + ":" + start + "," + send ); } if (send < sstart) { throw new IndexOutOfBoundsException( ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.