rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
sq.replace(10, blocks.length() + 10, blocks); | String blocks = (formatTokenBlock(ub, sa, 10, dnaTokenization)).toString(); | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
String count = Integer.toString((i * 60) + 1); sq.replace((9 - count.length()), 9, count); | sq.replace(10, blocks.length() + 10, blocks); | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
stream.println(sq); } | String count = Integer.toString((i * 60) + 1); sq.replace((9 - count.length()), 9, count); | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
stream.println(" } catch (IllegalSymbolException ex) { throw new IllegalAlphabetException(ex, "DNA not tokenizing"); } | stream.println(sq); } stream.println(" } catch (IllegalSymbolException ex) { throw new IllegalAlphabetException(ex, "DNA not tokenizing"); } | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
return temp.toString(); | return temp.substring(0); | private String sequenceBufferCreator(Object key, Object value) { StringBuffer temp = new StringBuffer(); if (value == null) { temp.append((String) key); } else if (value instanceof ArrayList) { Iterator iter = ((ArrayList) value).iterator(); temp.append((... |
DecimalFormat d3 = new DecimalFormat("0.000"); DecimalFormat d2 = new DecimalFormat("0.00"); | DecimalFormat d3 = (DecimalFormat)NumberFormat.getInstance(java.util.Locale.UK); d3.setMaximumIntegerDigits(3); d3.setMinimumFractionDigits(3); d3.setMaximumFractionDigits(3); DecimalFormat d2 = (DecimalFormat)NumberFormat.getInstance(java.util.Locale.UK); d2.setMaximumIntegerDigits(3); d3.setMinimumFractionDigits(3);... | public String toPDB() { StringBuffer str = new StringBuffer(); int i = 0 ; DecimalFormat d3 = new DecimalFormat("0.000"); DecimalFormat d2 = new DecimalFormat("0.00"); // do for all models int nrModels = structure.nrModels() ; if ( structure.isNmr()) { str.append("EXPDTA NMR, "+ nrModels+" STRUCTURES\n") ;... |
" seqfeature_source.source_name " + | " seqfeature_source.source_name, " + " seqfeature.bioentry_id " + | public void retrieveFeatures(int bioentry_id, SeqIOListener listener, Location topLevelOverlappingRegion, int immediateChildrenOfParent, int featureID) throws SQLException, BioException { Connection conn = seqDB.getPool().takeConnection(); Map fmap = new HashMap(); Map qmap = new HashMap... |
" seqfeature.bioentry_id = ? and " + | public void retrieveFeatures(int bioentry_id, SeqIOListener listener, Location topLevelOverlappingRegion, int immediateChildrenOfParent, int featureID) throws SQLException, BioException { Connection conn = seqDB.getPool().takeConnection(); Map fmap = new HashMap(); Map qmap = new HashMap... | |
get_features.setInt(1, bioentry_id); get_features.setInt(2, featureID); | get_features.setInt(1, featureID); | public void retrieveFeatures(int bioentry_id, SeqIOListener listener, Location topLevelOverlappingRegion, int immediateChildrenOfParent, int featureID) throws SQLException, BioException { Connection conn = seqDB.getPool().takeConnection(); Map fmap = new HashMap(); Map qmap = new HashMap... |
if (featureID >= 0 && bioentry_id < 0) { bioentry_id = rs.getInt(4); listener.addSequenceProperty("_biosql_internal.bioentry_id", new Integer(bioentry_id)); } | public void retrieveFeatures(int bioentry_id, SeqIOListener listener, Location topLevelOverlappingRegion, int immediateChildrenOfParent, int featureID) throws SQLException, BioException { Connection conn = seqDB.getPool().takeConnection(); Map fmap = new HashMap(); Map qmap = new HashMap... | |
CircularRenderer mlr = new CircleRenderer(); | CircularMLR mlr = new CircularMLR(); CircularFeatureRenderer cfr = new TorusRenderer(Color.BLACK, Color.BLUE, 8.0); CircularFeaturesRenderer cfrs = new CircularFeaturesRenderer(cfr); mlr.addRenderer(new CircularPaddedRenderer( new CircularFeatureFilteringRenderer( cfrs, FilterUtils.byType("gene"), false), 2.0, 2.0)); ... | public static void main(String[] args) throws Throwable { Sequence seq = SeqIOTools.readEmbl( new BufferedReader( new FileReader( new File(args[0]))) ).nextSequence(); JFrame frame = new JFrame("Circular Viewer"); frame.getContentPane().setLayout(n... |
return new CompoundRichLocation(groupTypeTerm, members); | if (members.size()>1) { return new CompoundRichLocation(groupTypeTerm, members); } else if (members.size()==1) { return (RichLocation)members.get(0); } else { throw new ParseException("Group found with no members. Term: "+groupType); } | private static RichLocation parseLocString(Namespace featureNS, String featureAccession, CrossRef parentXref, Strand parentStrand, String locStr) throws ParseException { Matcher gm = gp.matcher(locStr); if (!gm.matches()) throw new ParseException("Bad location string found: "+locStr); String xr... |
int end = start + length - 1; | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int end = start + length - 1; // My Changes are here locu... | |
initialSet.addNodeSet(nfa.getLambdaClosure(nfa.getStart())); | public void constructSubsets() throws AutomatonException { //System.out.println("constructSubsets() called."); // create a NodeSet comprising only the start state. FiniteAutomaton.NodeSet initialSet = nfa.createNodeSet(); //System.out.println("adding initial node to dfa."); ... | |
private AnnotationType getBlockAnnotationType() { | public AnnotationType getBlockAnnotationType() { | private AnnotationType getBlockAnnotationType() { AnnotationType annType ; segmentType = getSegmentAnnotationType(); annType = new AnnotationType.Impl(); annType.setConstraints("blockOrder", new PropertyConstraint.ByClass(String.class), CardinalityConstraint.ONE ) ; annType.setConstraints("block... |
private AnnotationType getObjectAnnotationType() { | public AnnotationType getObjectAnnotationType() { | private AnnotationType getObjectAnnotationType() { AnnotationType annType; annType = new AnnotationType.Impl(); //annType.setDefaultConstraints(PropertyConstraint.ANY, CardinalityConstraint.ANY) ; annType.setConstraints("dbAccessionId", new PropertyConstraint.ByClass(String.class), CardinalityCo... |
annType.setConstraints("intObjecId", | annType.setConstraints("intObjectId", | private AnnotationType getObjectAnnotationType() { AnnotationType annType; annType = new AnnotationType.Impl(); //annType.setDefaultConstraints(PropertyConstraint.ANY, CardinalityConstraint.ANY) ; annType.setConstraints("dbAccessionId", new PropertyConstraint.ByClass(String.class), CardinalityCo... |
private AnnotationType getScoreAnnotationType() { | public AnnotationType getScoreAnnotationType() { | private AnnotationType getScoreAnnotationType() { AnnotationType annType ; annType = new AnnotationType.Impl(); annType.setConstraints("methodName", new PropertyConstraint.ByClass(String.class), CardinalityConstraint.ONE ) ; annType.setConstraints("value", new PropertyConstraint.ByCl... |
private AnnotationType getSegmentAnnotationType() { | public AnnotationType getSegmentAnnotationType() { | private AnnotationType getSegmentAnnotationType() { AnnotationType annType ; annType = new AnnotationType.Impl(); annType.setConstraints("intObjectId", new PropertyConstraint.ByClass(String.class), CardinalityConstraint.ONE ) ; annType.setConstraints("start", new PropertyConstraint.ByCl... |
parent_cf_ComponentFeature = new FeatureFilter.ByParent(cf_ComponentFeature); ancestor_cf_ComponentFeature = new FeatureFilter.ByAncestor(cf_ComponentFeature); not_parent_cf_ComponentFeature = new FeatureFilter.Not(parent_cf_ComponentFeature); not_ancestor_cf_ComponentFeature = new FeatureFilter.Not(ancestor_cf_Compone... | protected void setUp() throws Exception { // // Three type filters (opaque but mutually disjoint). // tf1 = new FeatureFilter.ByType("hello"); tf2 = new FeatureFilter.ByType("goodbye"); tf3 = new FeatureFilter.ByType("moo"); // // Three annotation-property filters (opaque, non-disjoint) // pf1 = new FeatureFilter.H... | |
sequenceName.append("_pkey_seq"); | sequenceName.append("_pk_seq"); | public int getInsertID(Connection conn, String table, String columnName) throws SQLException { StringBuffer sequenceName = new StringBuffer(); /* Old style int totalLength = table.length() + columnName.length(); if (totalLength > 26 && table.length() > 13) { sequenceName.append(table.substring(0, 1... |
public static Query buildAgeCarQuery(int age, Map car, Node startNode) { | public static Query buildAgeCarQuery(int age, Map car) throws OperationException { | public static Query buildAgeCarQuery(int age, Map car, Node startNode) { QueryBuilder qb = new QueryBuilder(); Node aged = new SimpleNode("aged", Map.class); Node selectNode = new SimpleResultNode("selectNode", Map.class); qb.addArc( new Arc(startNode, aged), new MapValueFilter("age", ne... |
Node selectNode = new SimpleResultNode("selectNode", Map.class); | Node endNode = new SimpleNode("end", Map.class); | public static Query buildAgeCarQuery(int age, Map car, Node startNode) { QueryBuilder qb = new QueryBuilder(); Node aged = new SimpleNode("aged", Map.class); Node selectNode = new SimpleResultNode("selectNode", Map.class); qb.addArc( new Arc(startNode, aged), new MapValueFilter("age", ne... |
new Arc(aged, selectNode), | new Arc(aged, endNode), | public static Query buildAgeCarQuery(int age, Map car, Node startNode) { QueryBuilder qb = new QueryBuilder(); Node aged = new SimpleNode("aged", Map.class); Node selectNode = new SimpleResultNode("selectNode", Map.class); qb.addArc( new Arc(startNode, aged), new MapValueFilter("age", ne... |
public static Query buildAgeQuery(int age, Node startNode) { | public static Query buildAgeQuery(int age) throws OperationException { | public static Query buildAgeQuery(int age, Node startNode) { QueryBuilder qb = new QueryBuilder(); Node selectNode = new SimpleResultNode("selectNode", Map.class); qb.addArc( new Arc(startNode, selectNode), new MapValueFilter("age", new Integer(age)) ); return qb.buildQuery(); } |
Node selectNode = new SimpleResultNode("selectNode", Map.class); | Node startNode = new SimpleNode("start", Map.class); Node endNode = new SimpleNode("end", Map.class); | public static Query buildAgeQuery(int age, Node startNode) { QueryBuilder qb = new QueryBuilder(); Node selectNode = new SimpleResultNode("selectNode", Map.class); qb.addArc( new Arc(startNode, selectNode), new MapValueFilter("age", new Integer(age)) ); return qb.buildQuery(); } |
new Arc(startNode, selectNode), | new Arc(startNode, endNode), | public static Query buildAgeQuery(int age, Node startNode) { QueryBuilder qb = new QueryBuilder(); Node selectNode = new SimpleResultNode("selectNode", Map.class); qb.addArc( new Arc(startNode, selectNode), new MapValueFilter("age", new Integer(age)) ); return qb.buildQuery(); } |
public static Query buildCarByAgeQuery(int age, Node startNode) { | public static Query buildCarByAgeQuery(int age) throws OperationException { | public static Query buildCarByAgeQuery(int age, Node startNode) { QueryBuilder qb = new QueryBuilder(); Node selectNode = new SimpleResultNode("selectNode", Map.class); Node ageSelected = new SimpleNode("ageSelected", Map.class); qb.addArc( new Arc(startNode, ageSelected), new MapValueFilter... |
Node selectNode = new SimpleResultNode("selectNode", Map.class); | Node startNode = new SimpleNode("start", Map.class); Node endNode = new SimpleNode("end", Map.class); | public static Query buildCarByAgeQuery(int age, Node startNode) { QueryBuilder qb = new QueryBuilder(); Node selectNode = new SimpleResultNode("selectNode", Map.class); Node ageSelected = new SimpleNode("ageSelected", Map.class); qb.addArc( new Arc(startNode, ageSelected), new MapValueFilter... |
new Arc(ageSelected, selectNode), | new Arc(ageSelected, endNode), | public static Query buildCarByAgeQuery(int age, Node startNode) { QueryBuilder qb = new QueryBuilder(); Node selectNode = new SimpleResultNode("selectNode", Map.class); Node ageSelected = new SimpleNode("ageSelected", Map.class); qb.addArc( new Arc(startNode, ageSelected), new MapValueFilter... |
public static Query buildCarQuery(Node startNode) { | public static Query buildCarQuery() throws OperationException { | public static Query buildCarQuery(Node startNode) { QueryBuilder qb = new QueryBuilder(); Node selectNode = new SimpleResultNode("selectNode", Map.class); qb.addArc( new Arc(startNode, selectNode), new MapFollower("car", Map.class) ); return qb.buildQuery(); } |
Node selectNode = new SimpleResultNode("selectNode", Map.class); | Node startNode = new SimpleNode("start", Map.class); Node endNode = new SimpleNode("end", Map.class); | public static Query buildCarQuery(Node startNode) { QueryBuilder qb = new QueryBuilder(); Node selectNode = new SimpleResultNode("selectNode", Map.class); qb.addArc( new Arc(startNode, selectNode), new MapFollower("car", Map.class) ); return qb.buildQuery(); } |
new Arc(startNode, selectNode), | new Arc(startNode, endNode), | public static Query buildCarQuery(Node startNode) { QueryBuilder qb = new QueryBuilder(); Node selectNode = new SimpleResultNode("selectNode", Map.class); qb.addArc( new Arc(startNode, selectNode), new MapFollower("car", Map.class) ); return qb.buildQuery(); } |
public static Query buildPersonByCarColorQuery(Color color, Node startNode) { Node selectNode = new SimpleResultNode("selectNode", Map.class); | public static Query buildPersonByCarColorQuery(Color color) throws OperationException { Node startNode = new SimpleNode("start", Map.class); Node endNode = new SimpleNode("end", Map.class); | public static Query buildPersonByCarColorQuery(Color color, Node startNode) { Node selectNode = new SimpleResultNode("selectNode", Map.class); // select cars, and count them QueryBuilder qb1 = new QueryBuilder(); Node cars = new SimpleNode("cars", Map.class); Node ourCar = new SimpleResultNode("ou... |
Node ourCar = new SimpleResultNode("ourCar", Map.class); | Node ourCar = new SimpleNode("ourCar", Map.class); | public static Query buildPersonByCarColorQuery(Color color, Node startNode) { Node selectNode = new SimpleResultNode("selectNode", Map.class); // select cars, and count them QueryBuilder qb1 = new QueryBuilder(); Node cars = new SimpleNode("cars", Map.class); Node ourCar = new SimpleResultNode("ou... |
carQuery, startNode, Filter.CompareInteger.EQ, 1 | carQuery, startNode, ourCar, Filter.CompareInteger.EQ, 1 | public static Query buildPersonByCarColorQuery(Color color, Node startNode) { Node selectNode = new SimpleResultNode("selectNode", Map.class); // select cars, and count them QueryBuilder qb1 = new QueryBuilder(); Node cars = new SimpleNode("cars", Map.class); Node ourCar = new SimpleResultNode("ou... |
qb2.addArc(new Arc(startNode, selectNode), sizeFilter); | qb2.addArc(new Arc(startNode, endNode), sizeFilter); | public static Query buildPersonByCarColorQuery(Color color, Node startNode) { Node selectNode = new SimpleResultNode("selectNode", Map.class); // select cars, and count them QueryBuilder qb1 = new QueryBuilder(); Node cars = new SimpleNode("cars", Map.class); Node ourCar = new SimpleResultNode("ou... |
public static Query buildPersonByCarQuery(Map car, Node startNode) { Node selectNode = new SimpleResultNode("selectNode", Map.class); | public static Query buildPersonByCarQuery(Map car) throws OperationException { Node startNode = new SimpleNode("start", Map.class); Node endNode = new SimpleNode("end", Map.class); | public static Query buildPersonByCarQuery(Map car, Node startNode) { Node selectNode = new SimpleResultNode("selectNode", Map.class); // select cars, and count them QueryBuilder qb1 = new QueryBuilder(); Node cars = new SimpleNode("cars", Map.class); Node ourCar = new SimpleResultNode("ourCar", Ma... |
Node ourCar = new SimpleResultNode("ourCar", Map.class); | Node ourCar = new SimpleNode("ourCar", Map.class); | public static Query buildPersonByCarQuery(Map car, Node startNode) { Node selectNode = new SimpleResultNode("selectNode", Map.class); // select cars, and count them QueryBuilder qb1 = new QueryBuilder(); Node cars = new SimpleNode("cars", Map.class); Node ourCar = new SimpleResultNode("ourCar", Ma... |
carQuery, startNode, Filter.CompareInteger.EQ, 1 | carQuery, startNode, ourCar, Filter.CompareInteger.EQ, 1 | public static Query buildPersonByCarQuery(Map car, Node startNode) { Node selectNode = new SimpleResultNode("selectNode", Map.class); // select cars, and count them QueryBuilder qb1 = new QueryBuilder(); Node cars = new SimpleNode("cars", Map.class); Node ourCar = new SimpleResultNode("ourCar", Ma... |
qb2.addArc(new Arc(startNode, selectNode), sizeFilter); | qb2.addArc(new Arc(startNode, endNode), sizeFilter); | public static Query buildPersonByCarQuery(Map car, Node startNode) { Node selectNode = new SimpleResultNode("selectNode", Map.class); // select cars, and count them QueryBuilder qb1 = new QueryBuilder(); Node cars = new SimpleNode("cars", Map.class); Node ourCar = new SimpleResultNode("ourCar", Ma... |
public static void display(String message, Queryable items) { | public static void display(String message, Query query, Queryable items) throws OperationException { Node startNode = (Node) QueryTools.findNodeByLabel(query, "start").iterator().next(); Node endNode = (Node) QueryTools.findNodeByLabel(query, "end").iterator().next(); | public static void display(String message, Queryable items) { System.out.println(message); System.out.println(items); for(Iterator i = items.iterator(); i.hasNext(); ) { Object o = i.next(); System.out.println("\t" + o); } } |
System.out.println(items); for(Iterator i = items.iterator(); i.hasNext(); ) { | Queryable result = QueryTools.select(query, startNode, endNode, items); for(Iterator i = result.iterator(); i.hasNext(); ) { | public static void display(String message, Queryable items) { System.out.println(message); System.out.println(items); for(Iterator i = items.iterator(); i.hasNext(); ) { Object o = i.next(); System.out.println("\t" + o); } } |
Node startNode = new SimpleNode("startNode", Map.class); Query ageQuery25 = buildAgeQuery(25, startNode); Query ageQuery32 = buildAgeQuery(32, startNode); Query ageQuery45 = buildAgeQuery(45, startNode); | Query ageQuery25 = buildAgeQuery(25); Query ageQuery32 = buildAgeQuery(32); Query ageQuery45 = buildAgeQuery(45); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
display("Age is 25", QueryTools.select(ageQuery25, startNode, people)); display("Age is 32", QueryTools.select(ageQuery32, startNode, people)); display("Age is 45", QueryTools.select(ageQuery45, startNode, people)); | System.out.println("nodes: " + ageQuery25.getNodes()); System.out.println("arcs->ops: " + ageQuery25.getArcsToOperators()); display("Age is 25", ageQuery25, people); display("Age is 32", ageQuery32, people); display("Age is 45", ageQuery45, people); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
Query carQuery = buildCarQuery(startNode); | Query carQuery = buildCarQuery(); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
display("Finding cars", QueryTools.select(carQuery, startNode, people)); | display("Finding cars", carQuery, people); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
Query carQuery25 = buildCarByAgeQuery(25, startNode); Query carQuery32 = buildCarByAgeQuery(32, startNode); Query carQuery45 = buildCarByAgeQuery(45, startNode); | Query carQuery25 = buildCarByAgeQuery(25); Query carQuery32 = buildCarByAgeQuery(32); Query carQuery45 = buildCarByAgeQuery(45); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
display("Cars where age is 25", QueryTools.select(carQuery25, startNode, people)); display("Cars where age is 32", QueryTools.select(carQuery32, startNode, people)); display("Cars where age is 45", QueryTools.select(carQuery45, startNode, people)); | display("Cars where age is 25", carQuery25, people); display("Cars where age is 32", carQuery32, people); display("Cars where age is 45", carQuery45, people); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
Query age25or32 = buildAgeQuery(25, 32, startNode); Query age25or42 = buildAgeQuery(25, 42, startNode); Query age32or42 = buildAgeQuery(32, 42, startNode); | Query age25or32 = buildAgeQuery(25, 32); Query age25or42 = buildAgeQuery(25, 42); Query age32or42 = buildAgeQuery(32, 42); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
display("Cars where age25 or 32", QueryTools.select(age25or32, startNode, people)); display("Cars where age25 or 42", QueryTools.select(age25or42, startNode, people)); display("Cars where age32 or 42", QueryTools.select(age32or42, startNode, people)); | display("Cars where age25 or 32", age25or32, people); display("Cars where age25 or 42", age25or42, people); display("Cars where age32 or 42", age32or42, people); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
Query age25CarC1 = buildAgeCarQuery(25, c1, startNode); Query age25CarC2 = buildAgeCarQuery(25, c2, startNode); | Query age25CarC1 = buildAgeCarQuery(25, c1); Query age25CarC2 = buildAgeCarQuery(25, c2); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
display("People aged 25 and driving c1", QueryTools.select(age25CarC1, startNode, people)); display("People aged 25 and driving c2", QueryTools.select(age25CarC2, startNode, people)); | display("People aged 25 and driving c1", age25CarC1, people); display("People aged 25 and driving c2", age25CarC2, people); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
Query usingC1 = buildPersonByCarQuery(c1, startNode); Query usingC2 = buildPersonByCarQuery(c2, startNode); | Query usingC1 = buildPersonByCarQuery(c1); Query usingC2 = buildPersonByCarQuery(c2); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
display("People driving c1", QueryTools.select(usingC1, startNode, people)); display("People driving c2", QueryTools.select(usingC2, startNode, people)); | display("People driving c1", usingC1, people); display("People driving c2", usingC2, people); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
Query drivingRed = buildPersonByCarColorQuery(Color.red, startNode); Query drivingGray = buildPersonByCarColorQuery(Color.gray, startNode); | Query drivingRed = buildPersonByCarColorQuery(Color.red); Query drivingGray = buildPersonByCarColorQuery(Color.gray); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
display("People driving red", QueryTools.select(drivingRed, startNode, people)); display("People driving gray", QueryTools.select(drivingGray, startNode, people)); | display("People driving red", drivingRed, people); display("People driving gray", drivingGray, people); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... |
Query original = optimizableQuery(); Query optimized = QueryTools.optimize(original); display("Original query", original); display("Optimized query", optimized); pause(); | public static void main(String[] args) throws Throwable { Set carSet = new HashSet(); Map c1; Map c2; carSet.add(c1 = buildCar(Color.red, "astra")); carSet.add(c2 = buildCar(Color.gray, "metro")); Set peopleSet = new HashSet(); peopleSet.add(buildPerson("ted", 32, c1)); peopleSet.add(build... | |
position = position - mark + buffPos; | position = position - buffPos + mark; | public void reset() throws IOException { if (mark < 0) throw new IOException("The mark is not currently in scope"); position = position - mark + buffPos; buffPos = mark; } |
dataSourceString) | dataSource) | public FeatureHolder filter(FeatureFilter ff, boolean recurse) { if (FilterUtils.areDisjoint(ff, new FeatureFilter.ByAnnotation(DASSequence.PROPERTY_ANNOTATIONSERVER, dataSourceString) )) { return FeatureHolder.EMPTY_FEATURE_HOLDER; } return getFeatures().filter(ff, recurse); } |
int ds5Prime, int ds3Prime) | int dsForward, int dsReverse) | public RestrictionEnzyme(String name, SymbolList site, int ds5Prime, int ds3Prime) throws IllegalAlphabetException { this(name, site, null, new int [] { ds5Prime, ds3Prime }); } |
new int [] { ds5Prime, ds3Prime }); | new int [] { dsForward, dsReverse }); | public RestrictionEnzyme(String name, SymbolList site, int ds5Prime, int ds3Prime) throws IllegalAlphabetException { this(name, site, null, new int [] { ds5Prime, ds3Prime }); } |
if (usCutPositions[0] < usCutPositions[1]) | if (usCutPositions[0] > usCutPositions[1]) | public int getUpstreamEndType() throws BioException { if (usCutPositions == null) throw new BioException(name + " does not cut upstream of the recognition site"); if (usCutPositions[0] < usCutPositions[1]) return OVERHANG_5PRIME; else if (usCutPositions[0] > usCutPositi... |
else if (usCutPositions[0] > usCutPositions[1]) | else if (usCutPositions[0] < usCutPositions[1]) | public int getUpstreamEndType() throws BioException { if (usCutPositions == null) throw new BioException(name + " does not cut upstream of the recognition site"); if (usCutPositions[0] < usCutPositions[1]) return OVERHANG_5PRIME; else if (usCutPositions[0] > usCutPositi... |
private String getObsoleteChar() { | String getObsoleteChar() { | private String getObsoleteChar() { return (this.getObsolete()!=null && this.getObsolete().equals(Boolean.TRUE))?"X":null; } |
private Set getSynonymSet() { return this.synonyms; } | Set getSynonymSet() { return this.synonyms; } | private Set getSynonymSet() { return this.synonyms; } |
private void setObsoleteChar(String obsolete) throws ChangeVetoException { | void setObsoleteChar(String obsolete) throws ChangeVetoException { | private void setObsoleteChar(String obsolete) throws ChangeVetoException { this.setObsolete(Boolean.valueOf(obsolete!=null && obsolete.equals("X"))); } |
private void setSynonymSet(Set synonyms) { this.synonyms = synonyms; } | void setSynonymSet(Set synonyms) { this.synonyms = synonyms; } | private void setSynonymSet(Set synonyms) { this.synonyms = synonyms; } |
private void setAccession(String accession) { this.accession = accession; } | void setAccession(String accession) { this.accession = accession; } | private void setAccession(String accession) { this.accession = accession; } |
private void setDbname(String dbname) { this.dbname = dbname; } | void setDbname(String dbname) { this.dbname = dbname; } | private void setDbname(String dbname) { this.dbname = dbname; } |
private void setVersion(int version) { this.version = version; } | void setVersion(int version) { this.version = version; } | private void setVersion(int version) { this.version = version; } |
CrossRef crossRef = new SimpleCrossRef(parts[0].trim(),parts[1].trim(),0); | CrossRef crossRef = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{parts[0].trim(),parts[1].trim()}); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
int old = this.alignment; | public void setAlignment(int alignment) throws IllegalArgumentException { switch (alignment) { case LEADING: case TRAILING: case CENTER: int old = this.alignment; this.alignment = alignment; break; default: throw new IllegalArgumentExcepti... | |
line = new Line2D.Double(minX + halfScale, 0.0, maxX + halfScale, 0.0); | line = new Line2D.Double(minX - halfScale, 0.0, maxX + halfScale, 0.0); | public void paint( Graphics2D g, SequenceRenderContext src, RangeLocation pos ) { g.setPaint(Color.black); int min = pos.getMin(); int max = pos.getMax(); double minX = src.sequenceToGraphics(min); double maxX = src.sequenceToGraphics(max); double scale = src.getScale(); double halfSca... |
line = new Line2D.Double(0.0, minX + halfScale, 0.0, maxX + halfScale); | line = new Line2D.Double(0.0, minX - halfScale, 0.0, maxX + halfScale); | public void paint( Graphics2D g, SequenceRenderContext src, RangeLocation pos ) { g.setPaint(Color.black); int min = pos.getMin(); int max = pos.getMax(); double minX = src.sequenceToGraphics(min); double maxX = src.sequenceToGraphics(max); double scale = src.getScale(); double halfSca... |
super(); | public BioSQLRichSequenceHandler(Object session) { try { // Lazy load the Session class from Hibernate. Class hibernateSession = Class.forName("org.hibernate.Session"); // Test to see if our parameter is really a Session if (!hibernateSession.isInstance(session)) ... | |
if (seq instanceof SimpleRichSequence) super.edit(seq,edit); | public void edit(RichSequence seq, Edit edit) throws IndexOutOfBoundsException, IllegalAlphabetException, ChangeVetoException { throw new ChangeVetoException("Cannot modify this sequence. Convert to a SimpleRichSequence first."); } | |
if (seq instanceof SimpleRichSequence) return super.iterator(seq); | public Iterator iterator(RichSequence seq) { return this.toList(seq).iterator(); } | |
String queryText = "select s.stringSequence from Sequence as s where s = ?"; | String queryText = "select s.stringSequence from Sequence as s where s.namespace = ? and s.name = ?"; | public String seqString(RichSequence seq) { // load whole stringSequence property from Sequence try { // Build the query object String queryText = "select s.stringSequence from Sequence as s where s = ?"; Object query = this.createQuery.invoke(this.session, new Object[... |
query = this.setParameter.invoke(query, new Object[]{new Integer(0), seq}); | query = this.setParameter.invoke(query, new Object[]{new Integer(0), seq.getNamespace()}); query = this.setParameter.invoke(query, new Object[]{new Integer(1), seq.getName()}); | public String seqString(RichSequence seq) { // load whole stringSequence property from Sequence try { // Build the query object String queryText = "select s.stringSequence from Sequence as s where s = ?"; Object query = this.createQuery.invoke(this.session, new Object[... |
String queryText = "select substring(s.stringSequence,?,?) from Sequence as s where s = ?"; | String queryText = "select substring(s.stringSequence,?,?) from Sequence as s where s.namespace = ? and s.name = ?"; | private String seqSubString(RichSequence seq, int start, int end) { // load whole stringSequence property from Sequence try { // Build the query object String queryText = "select substring(s.stringSequence,?,?) from Sequence as s where s = ?"; Object query = this.creat... |
query = this.setParameter.invoke(query, new Object[]{new Integer(0), new Integer(start-1)}); | query = this.setParameter.invoke(query, new Object[]{new Integer(0), new Integer(start)}); | private String seqSubString(RichSequence seq, int start, int end) { // load whole stringSequence property from Sequence try { // Build the query object String queryText = "select substring(s.stringSequence,?,?) from Sequence as s where s = ?"; Object query = this.creat... |
query = this.setParameter.invoke(query, new Object[]{new Integer(2), seq}); | query = this.setParameter.invoke(query, new Object[]{new Integer(2), seq.getNamespace()}); query = this.setParameter.invoke(query, new Object[]{new Integer(3), seq.getName()}); | private String seqSubString(RichSequence seq, int start, int end) { // load whole stringSequence property from Sequence try { // Build the query object String queryText = "select substring(s.stringSequence,?,?) from Sequence as s where s = ?"; Object query = this.creat... |
if (seq instanceof SimpleRichSequence) return super.subList(seq,start,end); | public SymbolList subList(RichSequence seq, int start, int end) throws IndexOutOfBoundsException { return this.convertToSymbolList(this.subStr(seq,start,end),seq.getAlphabet()); } | |
if (seq instanceof SimpleRichSequence) return super.subStr(seq,start,end); | public String subStr(RichSequence seq, int start, int end) throws IndexOutOfBoundsException { if (seq.length()==0) return ""; // empty seq else if (seq.getCircular()) { StringBuffer result = new StringBuffer(); // place to store the resulting substring int[] modLocation = Tools.m... | |
if (seq instanceof SimpleRichSequence) return super.symbolAt(seq,index); | public Symbol symbolAt(RichSequence seq, int index) throws IndexOutOfBoundsException { return this.subList(seq, index, index).symbolAt(1); } | |
if (seq instanceof SimpleRichSequence) return super.toList(seq); | public List toList(RichSequence seq) { if (seq.length()==0) return new ArrayList(); // empty list for empty seq else return this.subList(seq,1,seq.length()).toList(); } | |
public WeakTaxon(String scientificName, String commonName) { super(scientificName, commonName); | public WeakTaxon() { super(); | public WeakTaxon(String scientificName, String commonName) { super(scientificName, commonName); } |
if(src.getDirection() == src.HORIZONTAL) { | if(src.getDirection() == SequenceRenderContext.HORIZONTAL) { | public void renderFeature( Graphics2D g, Feature f, SequenceRenderContext src ) { Shape s = null; Location loc = f.getLocation(); float min = (float) src.sequenceToGraphics(loc.getMin()); float max = (float) src.sequenceToGraphics(loc.getMax()); float pos = (min + max) / 2; float fDepth =... |
private Set getLocationSet() { | Set getLocationSet() { | private Set getLocationSet() { // Convert the location into a set of BioSQL-compatible simple locations// System.out.println("SimpleRichFeature.getLocationSet-featureId:"+featureId+", locsSet:"+locsSet+", getLocation:"+getLocation()); setTerm(locsSet, null); Collection newlocs = RichLoca... |
private void setLocationSet(Set locs) throws ChangeVetoException { | void setLocationSet(Set locs) throws ChangeVetoException { | private void setLocationSet(Set locs) throws ChangeVetoException { this.locsSet = locs; // original kept for Hibernate purposes // Construct a nice BioJavaX location from the set of BioSQL-compatible simple ones this.location = RichLocation.Tools.construct(RichLocation.Tools.merge(locs)); ... |
this.persist = hibernateSession.getMethod("persist", new Class[]{Object.class}); | this.persist = hibernateSession.getMethod("persist", new Class[]{String.class,Object.class}); | public HibernateRichObjectBuilder(Object session) { super(); // call the normal rich object builder first try { // Lazy load the Session class from Hibernate. Class hibernateSession = Class.forName("org.hibernate.Session"); // Test to see if our parameter is really a S... |
this.persist.invoke(this.session, new Object[]{o}); | this.persist.invoke(this.session, new Object[]{queryType,o}); | public Object buildObject(Class clazz, Object[] params) { // Create a wrapper object to do the search with Object o = super.buildObject(clazz, params); // Create the Hibernate query to look it up with String queryText; if (o instanceof SimpleNamespace) { queryText = "fr... |
this.crc = null; | public SimpleDocRef(String authors, String location) { if (authors==null) throw new IllegalArgumentException("Authors cannot be null"); if (location==null) throw new IllegalArgumentException("Location cannot be null"); this.crossref = null; this.authors = authors; this.title = nul... | |
public String getCRC() { return this.crc; } | public String getCRC() { StringBuffer sb = new StringBuffer(); sb.append((this.authors==null || this.authors.equals(""))?"<undef>":this.authors); sb.append((this.title==null || this.title.equals(""))?"<undef>":this.title); sb.append((this.location==null || this.location.equals(""))?"<undef>":this.location); return CRC.... | public String getCRC() { return this.crc; } |
public void setCRC(String CRC) throws ChangeVetoException { if(!this.hasListeners(DocRef.CRC)) { this.crc = CRC; } else { ChangeEvent ce = new ChangeEvent( this, DocRef.CRC, CRC, this.crc ); ChangeSupport cs = this.getChangeSupport(DocRef.CRC); synchronized(cs) { cs.firePreChangeEvent(ce); this.crc = CRC; cs.firePostCh... | private void setCRC(String CRC) {} | public void setCRC(String CRC) throws ChangeVetoException { if(!this.hasListeners(DocRef.CRC)) { this.crc = CRC; } else { ChangeEvent ce = new ChangeEvent( this, DocRef.CRC, CRC, this.crc ... |
public MassCalc() { | public MassCalc(String isotopicType) { hydroxMass = 0.0; if(isotopicType.equals(SymbolPropertyTable.AVG_MASS)){ hydroxMass = Havg + Oavg; } else if(isotopicType.equals(SymbolPropertyTable.MONO_MASS)){ hydroxMass = Hmono + Omono; } mSymbolPropertyHash = new HashMap(); SymbolPropertyTable symbolPropertyTable = Protei... | public MassCalc() { } |
public SimpleQuery(Set nodes, Map operationsToLabel) { this.nodes = nodes; this.operationsToLabel = operationsToLabel; this.arcsFrom = new HashMap(); this.arcsTo = new HashMap(); for(Iterator i = operationsToLabel.keySet().iterator(); i.hasNext(); ) { Arc arc = (Arc) i.next(); getSet(arc.from, arcsFrom).add(arc); getS... | SimpleQuery(QueryData qd) { super(qd); | public SimpleQuery(Set nodes, Map operationsToLabel) { this.nodes = nodes; this.operationsToLabel = operationsToLabel; this.arcsFrom = new HashMap(); this.arcsTo = new HashMap(); for(Iterator i = operationsToLabel.keySet().iterator(); i.hasNext(); ) { Arc arc = (Arc) i.next(); getSet(arc.... |
Set features = new TreeSet(); | public static RichSequence subSequence(RichSequence s, int from, int to, Namespace newNamespace, String newName, ... | |
if (context.getDirection() == context.HORIZONTAL) | if (context.getDirection() == PairwiseRenderContext.HORIZONTAL) | public void paint(Graphics2D g2, PairwiseRenderContext context) { Rectangle clip = g2.getClipBounds(); double xMin = clip.getMinX(); double xMax = clip.getMaxX(); double yMin = clip.getMinY(); double yMax = clip.getMaxY(); // Offset to get the hair to line up with the ce... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.