Examples of substring()


Examples of no.uib.jsparklines.data.XYDataPoint.substring()

            // open protein link in web browser
            if (pdbMatchesJTable.getSelectedColumn() == pdbMatchesJTable.getColumn("PDB").getModelIndex() && evt.getButton() == MouseEvent.BUTTON1
                    && ((String) pdbMatchesJTable.getValueAt(pdbMatchesJTable.getSelectedRow(), pdbMatchesJTable.getSelectedColumn())).lastIndexOf("<html>") != -1) {

                String temp = currentlyDisplayedPdbFile.substring(currentlyDisplayedPdbFile.indexOf("\"") + 1);
                currentlyDisplayedPdbFile = temp.substring(0, temp.indexOf("\""));

                this.setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));
                BareBonesBrowserLaunch.openURL(currentlyDisplayedPdbFile);
                this.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
            }
View Full Code Here

Examples of org.allcolor.xml.parser.CStringBuilder.substring()

            selector = selector.substring(0,
                selector.indexOf(" ")).trim();
          } // end if

          if (rule.indexOf(";") != -1) {
            previousToken = rule.substring(rule.indexOf(";"));
            list.add(selector +
              rule.substring(0, rule.indexOf(";")));

            continue;
          } // end if
View Full Code Here

Examples of org.antlr.runtime.CharStream.substring()

    private String getCoreSQL(RuleReturnScope parsedSQL) {
        final CommonTree ast = (CommonTree) parsedSQL.getTree();
        final CommonToken nameToken = (CommonToken) ((CommonTree) ast.getChild(1)).getToken();
        final CharStream inputStream = nameToken.getInputStream();
        final CommonToken stopToken = (CommonToken) parsedSQL.getStop();
        return inputStream.substring(nameToken.getStartIndex(), stopToken.getStopIndex());
    }

    /**
     * @param i
     * @return
 
View Full Code Here

Examples of org.antlr.runtime.CharStream.substring()

        final ParserRuleReturnScope parsedSql = alterTableDef.getParsedSql();
        final CommonTree ast = (CommonTree) parsedSql.getTree();
        final CommonToken stopToken = (CommonToken) parsedSql.getStop();
        final CommonToken nameToken = (CommonToken) ((CommonTree) ast.getChild(ast.getChildCount() - 1)).getToken();
        final CharStream inputStream = nameToken.getInputStream();
        return inputStream.substring(nameToken.getStartIndex(), stopToken.getStopIndex());
    }

    /**
     * @param sql
     * @param alterTableDef
View Full Code Here

Examples of org.antlr.runtime.CharStream.substring()

        final CommonToken stopToken = (CommonToken) parsedSQL.getStop();

        final StringBuilder b = new StringBuilder();

        if (alterTableDef.getNewTableName() != null) {
            b.append(inputStream.substring(0, nameToken.getStartIndex() - 1));
            b.append(getAlterTableName(alterTableDef));
            b.append(inputStream.substring(nameToken.getStopIndex() + 1, stopToken.getStopIndex()));
        } else if (alterTableDef.getNewColumnDef() != null) {
            b.append(inputStream.substring(0, stopToken.getStartIndex() - 1));
            b.append(",").append(getAlterTableName(alterTableDef));
View Full Code Here

Examples of org.antlr.runtime.CharStream.substring()

        final StringBuilder b = new StringBuilder();

        if (alterTableDef.getNewTableName() != null) {
            b.append(inputStream.substring(0, nameToken.getStartIndex() - 1));
            b.append(getAlterTableName(alterTableDef));
            b.append(inputStream.substring(nameToken.getStopIndex() + 1, stopToken.getStopIndex()));
        } else if (alterTableDef.getNewColumnDef() != null) {
            b.append(inputStream.substring(0, stopToken.getStartIndex() - 1));
            b.append(",").append(getAlterTableName(alterTableDef));
            b.append(inputStream.substring(stopToken.getStartIndex(), stopToken.getStopIndex()));
        } else {
View Full Code Here

Examples of org.antlr.runtime.CharStream.substring()

        if (alterTableDef.getNewTableName() != null) {
            b.append(inputStream.substring(0, nameToken.getStartIndex() - 1));
            b.append(getAlterTableName(alterTableDef));
            b.append(inputStream.substring(nameToken.getStopIndex() + 1, stopToken.getStopIndex()));
        } else if (alterTableDef.getNewColumnDef() != null) {
            b.append(inputStream.substring(0, stopToken.getStartIndex() - 1));
            b.append(",").append(getAlterTableName(alterTableDef));
            b.append(inputStream.substring(stopToken.getStartIndex(), stopToken.getStopIndex()));
        } else {
            throw new SqlJetException("Wrong ALTER TABLE statement");
        }
View Full Code Here

Examples of org.antlr.runtime.CharStream.substring()

            b.append(getAlterTableName(alterTableDef));
            b.append(inputStream.substring(nameToken.getStopIndex() + 1, stopToken.getStopIndex()));
        } else if (alterTableDef.getNewColumnDef() != null) {
            b.append(inputStream.substring(0, stopToken.getStartIndex() - 1));
            b.append(",").append(getAlterTableName(alterTableDef));
            b.append(inputStream.substring(stopToken.getStartIndex(), stopToken.getStopIndex()));
        } else {
            throw new SqlJetException("Wrong ALTER TABLE statement");
        }

        return b.toString();
View Full Code Here

Examples of org.antlr.runtime.CharStream.substring()

        final CommonTree ast = (CommonTree) parsedSQL.getTree();
        final CommonToken nameToken = (CommonToken) ((CommonTree) ast.getChild(2)).getToken();
        final CharStream inputStream = nameToken.getInputStream();
        final CommonToken stopToken = (CommonToken) parsedSQL.getStop();
        final StringBuilder b = new StringBuilder();
        b.append(inputStream.substring(0, nameToken.getStartIndex() - 1));
        b.append(alterTableName);
        b.append(inputStream.substring(nameToken.getStopIndex() + 1, stopToken.getStopIndex()));
        return b.toString();
    }
View Full Code Here

Examples of org.antlr.runtime.CharStream.substring()

        final CharStream inputStream = nameToken.getInputStream();
        final CommonToken stopToken = (CommonToken) parsedSQL.getStop();
        final StringBuilder b = new StringBuilder();
        b.append(inputStream.substring(0, nameToken.getStartIndex() - 1));
        b.append(alterTableName);
        b.append(inputStream.substring(nameToken.getStopIndex() + 1, stopToken.getStopIndex()));
        return b.toString();
    }

    private ParserRuleReturnScope parseSqlStatement(String sql) throws SqlJetException {
        try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.