Package com.nexirius.util

Examples of com.nexirius.util.StringVector.firstItem()


        }

        ArrayModel arr = null;
        String[] columnNames = null;

        for (String line = sv.firstItem(); line != null; line = sv.nextItem()) {

            StringVector tokens = new StringVector(line, ';', false);

            if (tokens.size() < 2) {
                continue;
View Full Code Here


        if (fieldNames.size() > 0) {
            e = selectionArray.getEnumeration();

            while (e.hasMore()) {
                DataModel item = e.next();
                String fieldValue = fieldValues.firstItem();
                boolean hit = true;

                for (String fieldName = fieldNames.firstItem(); fieldName != null; fieldName = fieldNames.nextItem()) {

                    if (!item.getChildText(fieldName).startsWith(fieldValue)) {
View Full Code Here

                if (isInterrupted() || this != thread) {
                    return;
                }

                if (tipText.size() == 1 && text.equals(tipText.firstItem())) {
                    removeTip();
                } else {
                    setTip(tipText, hasMore);
                }
            }
View Full Code Here

                if (!args[i].endsWith(java.io.File.separator))
                    files = new XFile(args[i] + java.io.File.separator);

                StringVector mostFiles = files.getAllFiles(true);

                String s = mostFiles.firstItem();

                while (s != null) {
                    m_win.tickle();
                    if (s.endsWith(".class")) {
                        s = files.getParent() + java.io.File.separator + s.substring(0, s.indexOf(".class"));
View Full Code Here

                ImportModel importModel = new ImportModel();
                ArrayModel array = importModel.getLines();
                int maxAttributes = 0;
                StructModel maxLineModel = null;

                for (String line = sv.firstItem(); line != null; line = sv.nextItem()) {
                    XString xLine = new XString(line);
                    xLine.replace("\"", "");
                    StringVector tokens = new StringVector(xLine.toString(), SEPARATOR_CHAR[separator.getInt()]);

                    if (tokens.size() > 2) {
View Full Code Here

                    if (tokens.size() > 2) {
                        StructModel lineModel = new StructModel("Line");
                        int fieldId = 0;

                        for (String value = tokens.firstItem(); value != null; value = tokens.nextItem()) {
                            lineModel.append(new StringModel(value, "field_" + fieldId));
                            ++fieldId;

                            if (fieldId > maxAttributes) {
                                maxAttributes = fieldId;
View Full Code Here

    public SortedVector getAll(Class cl, String propertyName, String propertyValue) {
        SortedVector ret = new DataModelVector();
        try {
            XFile dir = getDirectory(cl);
            StringVector files = dir.getFiles(false); // get the list of all the files in this directory
            for (String id = files.firstItem(); id != null; id = files.nextItem()) {
                DataModel model = (DataModel) cl.newInstance(); //create a new instance of the given type
                XFile file = new XFile(dir.getPath(), id);
                model.dropData(new String(file.getBytes()));
                model.setInstanceName(id);
                if (propertyValue == null || propertyValue.equals(model.getChildText(propertyName))) {
View Full Code Here

            appendLine(renderHTML, result, HTMLFunction.PARAMETER_ISEDITOR  + "=" + sessionVariable.isEditor());
            appendLine(renderHTML, result, HTMLFunction.PARAMETER_SELECTED  + "=" + sessionVariable.getSelectedChildren());
            appendLine(renderHTML, result, HTMLFunction.PARAMETER_STATE  + "=" + sessionVariable.getState());
            appendLine(renderHTML, result, HTMLFunction.PARAMETER_TEMPLATE  + "=" + sessionVariable.getTemplate());

            for (String s = variableNames.firstItem(); s != null; s = variableNames.nextItem()) {
                appendLine(renderHTML, result, "VARIABLE " + s + ": " + resolver.getVariableStore().getValueOf(s));
            }
            if (renderHTML) {
                result.append("</table>");
            } else {
View Full Code Here

                if (icon != null) {
                    qpanel.add(new JLabel(icon));
                }

                for (s = sv.firstItem(); s != null; s = sv.nextItem()) {
                    qpanel.add(new JLabel(s));
                }

                q = qpanel;
            } else {
View Full Code Here

    public void readEntries(String filename) throws Exception {
        XFile file = new XFile(filename);

        StringVector lines = file.getTextLines();

        for (String line = lines.firstItem(); line != null; line = lines.nextItem()) {
            EntryModel entry = new EntryModel();

            if (entry.parse(line)) {
                sortInsert(entry);
            }
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.