Examples of AttributeTable


Examples of org.bouncycastle.asn1.cms.AttributeTable

        ArrayList certList = new ArrayList();
        certList.add(cert);
        CertStore certs = CertStore.getInstance("Collection", new CollectionCertStoreParameters(certList), "BC");
        gen1.addCertificatesAndCRLs(certs);
        gen1.addSigner(keys.getPrivate(), cert, digestOid,
                new AttributeTable(attributes), null);
        // The signed data to be enveloped
        CMSSignedData s = gen1.generate(signThis, true, "BC");
        return s;
    }
View Full Code Here

Examples of org.bouncycastle.asn1.cms.AttributeTable

            digestEncryptionAlgorithmOid = ((ASN1ObjectIdentifier)((ASN1Sequence)signerInfo.getObjectAt(next++)).getObjectAt(0)).getId();
            digest = ((ASN1OctetString)signerInfo.getObjectAt(next++)).getOctets();
            if (next < signerInfo.size() && signerInfo.getObjectAt(next) instanceof ASN1TaggedObject) {
                ASN1TaggedObject taggedObject = (ASN1TaggedObject) signerInfo.getObjectAt(next);
                ASN1Set unat = ASN1Set.getInstance(taggedObject, false);
                AttributeTable attble = new AttributeTable(unat);
                Attribute ts = attble.get(PKCSObjectIdentifiers.id_aa_signatureTimeStampToken);
                if (ts != null && ts.getAttrValues().size() > 0) {
                    ASN1Set attributeValues = ts.getAttrValues();
                    ASN1Sequence tokenSequence = ASN1Sequence.getInstance(attributeValues.getObjectAt(0));
                    ContentInfo contentInfo = new ContentInfo(tokenSequence);
                    this.timeStampToken = new TimeStampToken(contentInfo);
View Full Code Here

Examples of org.geotools.gce.grassraster.core.color.AttributeTable

        */
        BufferedReader rdr = new BufferedReader(new FileReader(readerGrassEnv.getCATS()));
        try {

            /* Instantiate attribute table */
            AttributeTable attTable = new AttributeTable();
            /* Ignore first 4 lines. */
            rdr.readLine();
            rdr.readLine();
            rdr.readLine();
            rdr.readLine();
            /* Read next n lines */
            String line;
            while( (line = rdr.readLine()) != null ) {
                /* All lines other than '0:no data' are processed */
                if (line.indexOf("0:no data") == -1) { //$NON-NLS-1$
                    JlsTokenizer tk = new JlsTokenizer(line, ":"); //$NON-NLS-1$
                    if (tk.countTokens() == 2) {
                        float f = Float.parseFloat(tk.nextToken());
                        String att = tk.nextToken().trim();
                        attTable.addAttribute(f, att);
                    } else if (tk.countTokens() == 3) {
                        float f0 = Float.parseFloat(tk.nextToken());
                        float f1 = Float.parseFloat(tk.nextToken());
                        String att = tk.nextToken().trim();
                        attTable.addAttribute(f0, f1, att);
                    }
                }
            }

            List<String> attrs = new ArrayList<String>();
            Enumeration<CellAttribute> categories = attTable.getCategories();
            while( categories.hasMoreElements() ) {
                AttributeTable.CellAttribute object = categories.nextElement();
                attrs.add(object.toString());
            }

View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeTable

                }
                if (colorHex != -1) {
                    node.setColor(new Color(colorHex));
                }
            } else {
                AttributeTable nodeClass = container.getAttributeModel().getNodeTable();
                AttributeColumn column = null;
                if ((column = nodeClass.getColumn(key)) == null) {
                    column = nodeClass.addColumn(key, AttributeType.STRING);
                    report.log("Node attribute " + column.getTitle() + " (" + column.getType() + ")");
                }
                node.addAttributeValue(column, value.toString());
            }
        }
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeTable

                    edge.setType(type);
                } else {
                    report.logIssue(new Issue(NbBundle.getMessage(ImporterGML.class, "importerGML_error_directedparse", edge.toString()), Issue.Level.WARNING));
                }
            } else {
                AttributeTable edgeClass = container.getAttributeModel().getEdgeTable();
                AttributeColumn column = null;
                if ((column = edgeClass.getColumn(key)) == null) {
                    column = edgeClass.addColumn(key, AttributeType.STRING);
                    report.log("Edge attribute " + column.getTitle() + " (" + column.getType() + ")");
                }
                edge.addAttributeValue(column, value.toString());
            }
        }
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeTable

            return;
        }

        ResultSet rs = s.getResultSet();
        findNodeAttributesColumns(rs);
        AttributeTable nodeClass = container.getAttributeModel().getNodeTable();
        ResultSetMetaData metaData = rs.getMetaData();
        int columnsCount = metaData.getColumnCount();
        int count = 0;
        while (rs.next()) {
            NodeDraft node = factory.newNodeDraft();
            for (int i = 0; i < columnsCount; i++) {
                String columnName = metaData.getColumnLabel(i + 1);
                NodeProperties p = properties.getNodeProperty(columnName);
                if (p != null) {
                    injectNodeProperty(p, rs, i + 1, node);
                } else {
                    //Inject node attributes
                    AttributeColumn col = nodeClass.getColumn(columnName);
                    injectNodeAttribute(rs, i + 1, col, node);
                }
            }
            container.addNode(node);
            ++count;
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeTable

            report.logIssue(new Issue("Failed to execute Edge query", Issue.Level.SEVERE, ex));
            return;
        }
        ResultSet rs = s.getResultSet();
        findEdgeAttributesColumns(rs);
        AttributeTable edgeClass = container.getAttributeModel().getEdgeTable();
        ResultSetMetaData metaData = rs.getMetaData();
        int columnsCount = metaData.getColumnCount();
        int count = 0;
        while (rs.next()) {
            EdgeDraft edge = factory.newEdgeDraft();
            for (int i = 0; i < columnsCount; i++) {
                String columnName = metaData.getColumnLabel(i + 1);
                EdgeProperties p = properties.getEdgeProperty(columnName);
                if (p != null) {
                    injectEdgeProperty(p, rs, i + 1, edge);
                } else {
                    //Inject edge attributes
                    AttributeColumn col = edgeClass.getColumn(columnName);
                    injectEdgeAttribute(rs, i + 1, col, edge);
                }
            }

            container.addEdge(edge);
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeTable

    }

    private void findNodeAttributesColumns(ResultSet rs) throws SQLException {
        ResultSetMetaData metaData = rs.getMetaData();
        int columnsCount = metaData.getColumnCount();
        AttributeTable nodeClass = container.getAttributeModel().getNodeTable();
        for (int i = 0; i < columnsCount; i++) {
            String columnName = metaData.getColumnLabel(i + 1);
            NodeProperties p = database.getPropertiesAssociations().getNodeProperty(columnName);
            if (p == null) {
                //No property associated to this column is found, so we append it as an attribute

                AttributeType type = AttributeType.STRING;
                switch (metaData.getColumnType(i + 1)) {
                    case Types.BIGINT:
                        type = AttributeType.LONG;
                        break;
                    case Types.INTEGER:
                        type = AttributeType.INT;
                        break;
                    case Types.TINYINT:
                        type = AttributeType.INT;
                        break;
                    case Types.SMALLINT:
                        type = AttributeType.INT;
                        break;
                    case Types.BOOLEAN:
                        type = AttributeType.BOOLEAN;
                        break;
                    case Types.FLOAT:
                        type = AttributeType.FLOAT;
                        break;
                    case Types.DOUBLE:
                        type = AttributeType.DOUBLE;
                        break;
                    case Types.VARCHAR:
                        type = AttributeType.STRING;
                        break;
                    default:
                        report.logIssue(new Issue("Unknown SQL Type " + metaData.getColumnType(i + 1) + ", STRING used.", Issue.Level.WARNING));
                        break;
                }
                report.log("Node attribute found: " + columnName + "(" + type + ")");
                nodeClass.addColumn(columnName, type);
            }
        }
    }
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeTable

    }

    private void findEdgeAttributesColumns(ResultSet rs) throws SQLException {
        ResultSetMetaData metaData = rs.getMetaData();
        int columnsCount = metaData.getColumnCount();
        AttributeTable edgeClass = container.getAttributeModel().getEdgeTable();
        for (int i = 0; i < columnsCount; i++) {
            String columnName = metaData.getColumnLabel(i + 1);
            EdgeProperties p = database.getPropertiesAssociations().getEdgeProperty(columnName);
            if (p == null) {
                //No property associated to this column is found, so we append it as an attribute
                AttributeType type = AttributeType.STRING;
                switch (metaData.getColumnType(i + 1)) {
                    case Types.BIGINT:
                        type = AttributeType.LONG;
                        break;
                    case Types.INTEGER:
                        type = AttributeType.INT;
                        break;
                    case Types.TINYINT:
                        type = AttributeType.INT;
                        break;
                    case Types.SMALLINT:
                        type = AttributeType.INT;
                        break;
                    case Types.BOOLEAN:
                        type = AttributeType.BOOLEAN;
                        break;
                    case Types.FLOAT:
                        type = AttributeType.FLOAT;
                        break;
                    case Types.DOUBLE:
                        type = AttributeType.DOUBLE;
                        break;
                    case Types.VARCHAR:
                        type = AttributeType.STRING;
                        break;
                    default:
                        report.logIssue(new Issue("Unknown SQL Type " + metaData.getColumnType(i + 1) + ", STRING used.", Issue.Level.WARNING));
                        break;
                }

                report.log("Edge attribute found: " + columnName + "(" + type + ")");
                edgeClass.addColumn(columnName, type);
            }
        }
    }
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeTable

                report.log("Node property found: label");
            } else if (columnName.equals("labelvisible")) {
                nodeColumns[i - 1] = new GDFColumn(GDFColumn.NodeGuessColumn.LABELVISIBLE);
                report.log("Node property found: labelvisible");
            } else {
                AttributeTable nodeClass = container.getAttributeModel().getNodeTable();
                if (!nodeClass.hasColumn(columnName)) {
                    AttributeColumn newColumn = nodeClass.addColumn(columnName, type);
                    nodeColumns[i - 1] = new GDFColumn(newColumn);
                    report.log("Node attribute " + columnName + " (" + type.getTypeString() + ")");
                } else {
                    report.logIssue(new Issue(NbBundle.getMessage(ImporterGDF.class, "importerGDF_error_dataformat8", columnName), Issue.Level.SEVERE));
                }
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.