Package org.openbel.framework.common.protonetwork.model.DocumentTable

Examples of org.openbel.framework.common.protonetwork.model.DocumentTable.DocumentHeader


                    "Description", "Version", "Copyright", "Disclaimer",
                    "ContactInfo", "Authors", "Licenses");

            List<DocumentHeader> dhs = dt.getDocumentHeaders();
            for (int i = 0; i < dhs.size(); i++) {
                DocumentHeader dh = dhs.get(i);

                tdvWriter
                        .writeNext(new String[] {
                                String.valueOf(i),
                                dh.getName() == null ? "-" : dh.getName(),
                                dh.getDescription() == null ? "-" : dh
                                        .getDescription(),
                                dh.getVersion() == null ? "-" : dh.getVersion(),
                                dh.getCopyright() == null ? "-" : dh
                                        .getCopyright(),
                                dh.getDisclaimer() == null ? "-" : dh
                                        .getDisclaimer(),
                                dh.getContactInfo() == null ? "-" : dh
                                        .getContactInfo(),
                                dh.getAuthors() == null ? "-" : dh.getAuthors(),
                                dh.getLicenses() == null ? "-" : dh
                                        .getLicenses() });

                allWriter
                        .writeNext(new String[] {
                                String.valueOf(i),
                                dh.getName() == null ? "-" : dh.getName(),
                                dh.getDescription() == null ? "-" : dh
                                        .getDescription(),
                                dh.getVersion() == null ? "-" : dh.getVersion(),
                                dh.getCopyright() == null ? "-" : dh
                                        .getCopyright(),
                                dh.getDisclaimer() == null ? "-" : dh
                                        .getDisclaimer(),
                                dh.getContactInfo() == null ? "-" : dh
                                        .getContactInfo(),
                                dh.getAuthors() == null ? "-" : dh.getAuthors(),
                                dh.getLicenses() == null ? "-" : dh
                                        .getLicenses() });
            }

            tdvWriter.close();
        } catch (IOException e) {
View Full Code Here


    public ProtoNetwork buildProtoNetwork() {
        ProtoNetwork pn = new ProtoNetwork();

        // handle document header
        DocumentTable dt = pn.getDocumentTable();
        dt.addDocumentHeader(new DocumentHeader(doc.getHeader()));

        // handle namespaces
        NamespaceGroup nsg = doc.getNamespaceGroup();
        if (nsg != null) {
            NamespaceTable nt = pn.getNamespaceTable();
View Full Code Here

            throws SQLException {
        PreparedStatement ps =
                getPreparedStatement(DOCUMENT_HEADER_INFORMATION_SQL);

        for (int i = 0; i < documents.size(); i++) {
            DocumentHeader dh = documents.get(i);

            ps.setInt(1, (i + 1));
            ps.setString(2, StringUtils.left(dh.getName(), 255));
            ps.setString(3, StringUtils.left(dh.getDescription(), 255));
            ps.setString(4, StringUtils.left(dh.getVersion(), 64));
            ps.setString(5, StringUtils.left(dh.getCopyright(), 4000));
            ps.setString(6, StringUtils.left(dh.getDisclaimer(), 4000));
            ps.setString(7, StringUtils.left(dh.getContactInfo(), 4000));
            ps.setString(8, StringUtils.left(dh.getAuthors(), 4000));
            ps.setString(9, StringUtils.left(dh.getLicenses(), 4000));

            ps.execute();
        }
    }
View Full Code Here

TOP

Related Classes of org.openbel.framework.common.protonetwork.model.DocumentTable.DocumentHeader

Copyright © 2018 www.massapicom. 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.