Package org.openbel.framework.common.model

Examples of org.openbel.framework.common.model.Header


    /**
     * Tests that statement triples in two {@link Document documents} will
     * produce the same merged result regardless of document sequence.
     */
    public void commutative_simple() {
        Document a = make_document(new Header("Doc 1", "Doc 1", "1.0"),
                new NamespaceGroup(URL, null),
                parse("g(AKT2) -> r(AKT3)"),
                parse("p(AKT1) => complex(p(DUSP1), p(WRN))"));
        Document b = make_document(new Header("Doc 2", "Doc 2", "1.0"),
                new NamespaceGroup(URL, null),
                parse("m(AKT1) =| p(AKT2)"),
                parse("cat(g(AKT2)) -| p(PARP1)"));

        // merge in different orders
View Full Code Here


    /**
     * Tests that subject-only statements in two {@link Document documents}
     * will produce the same merged result regardless of document sequence.
     */
    public void commutative_subject_only() {
        Document a = make_document(new Header("Doc 1", "Doc 1", "1.0"),
                new NamespaceGroup(URL, null),
                parse("r(AKT3)"),
                parse("p(AKT1)"));
        Document b = make_document(new Header("Doc 2", "Doc 2", "1.0"),
                new NamespaceGroup(URL, null),
                parse("m(AKT1)"),
                parse("g(AKT2)"));

        // merge in different orders
View Full Code Here

    /**
     * Tests that nested statements in two {@link Document documents} will
     * produce the same merged result regardless of document sequence.
     */
    public void commutative_nested() {
        Document a = make_document(new Header("Doc 1", "Doc 1", "1.0"),
                new NamespaceGroup(URL, null),
                parse("r(AKT3) => (g(PARP1) -| cat(p(AKT2)))"),
                parse("p(AKT1) -> (kin(p(PARP1)) -| p(AKT3))"));
        Document b = make_document(new Header("Doc 2", "Doc 2", "1.0"),
                new NamespaceGroup(URL, null),
                parse("m(AKT1) => (g(PARP1) -| p(AKT2))"),
                parse("g(AKT2) -> (r(AKT1) => p(PARP1))"));

        // merge in different orders
View Full Code Here

        String name = source.getName();
        String description = source.getDescription();
        String version = source.getVersion();

        // Destination type
        Header dest = new Header(name, description, version);

        if (source.isSetAuthorGroup()) {
            List<String> author = source.getAuthorGroup().getAuthor();
            dest.setAuthors(author);
        }

        if (source.isSetLicenseGroup()) {
            List<String> license = source.getLicenseGroup().getLicense();
            dest.setLicenses(license);
        }

        String copyright = source.getCopyright();
        dest.setCopyright(copyright);

        String disclaimer = source.getDisclaimer();
        dest.setDisclaimer(disclaimer);

        String contactInfo = source.getContactInfo();
        dest.setContactInfo(contactInfo);

        return dest;
    }
View Full Code Here

    @Override
    public Header convert(BELDocumentHeader bdh) {
        String name = bdh.getName();
        String desc = bdh.getDescription();
        String version = bdh.getVersion();
        Header h = new Header(name, desc, version);
        h.setAuthors(Arrays.asList(bdh.getAuthor()));
        h.setContactInfo(bdh.getContactInfo());
        h.setCopyright(bdh.getCopyright());
        h.setDisclaimer(bdh.getDisclaimer());
        h.setLicenses(bdh.getLicense() == null ? null : Arrays.asList(bdh
                .getLicense()));

        return h;
    }
View Full Code Here

    public Document convert(BELDocument bd) {
        if (bd == null) {
            return null;
        }

        final Header header = dhc.convert(bd.getDocumentHeader());

        // handle annotation definitions
        Set<BELAnnotationDefinition> badlist = bd.getAnnotationDefinitions();
        List<AnnotationDefinition> adlist = null;
        if (badlist != null) {
View Full Code Here

                }
            }
            xd.setAnnotationDefinitionGroup(xadGroup);
        }

        Header header = source.getHeader();
        HeaderConverter hConverter = new HeaderConverter();
        // Defer to HeaderConverter
        xd.setHeader(hConverter.convert(header));

        NamespaceGroup nsGroup = source.getNamespaceGroup();
View Full Code Here

TOP

Related Classes of org.openbel.framework.common.model.Header

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.