Package org.openbel.framework.common.model

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


        }
        if (output.getSymbolWarning() != null) {
            stageError(output.getSymbolWarning().getUserFacingMessage());
        }
        long t2 = currentTimeMillis();
        Document pfDoc = output.getDocument();

        bldr.setLength(0);
        markTime(bldr, t1, t2);
        stageOutput(bldr.toString());
View Full Code Here


        }
        if (output.getSymbolWarning() != null) {
            stageError(output.getSymbolWarning().getUserFacingMessage());
        }
        long t2 = currentTimeMillis();
        Document ncDoc = output.getDocument();

        bldr.setLength(0);
        markTime(bldr, t1, t2);
        stageOutput(bldr.toString());
View Full Code Here

        }
        if (output.getSymbolWarning() != null) {
            stageError(output.getSymbolWarning().getUserFacingMessage());
        }
        long t2 = currentTimeMillis();
        Document gsDoc = output.getDocument();

        bldr.setLength(0);
        markTime(bldr, t1, t2);
        stageOutput(bldr.toString());
View Full Code Here

            throws ProtoNetworkError {
        final Index resourceIndex = ResourceIndex.INSTANCE.getIndex();
        final ResourceLocation pfResource = resourceIndex
                .getProteinFamilyResource();

        final Document pfdoc = readResource(pfResource);
        p3.pruneFamilies(false, pfdoc, orthoPn);
        p3.inferFamilies(pfdoc, orthoPn);
        final ProtoNetwork pfpn = p3.compile(pfdoc);
        p3.merge(orthoPn, pfpn);

        final ResourceLocation ncResource = resourceIndex
                .getNamedComplexesResource();
        final Document ncdoc = readResource(ncResource);
        p3.pruneComplexes(false, ncdoc, orthoPn);
        final ProtoNetwork ncpn = p3.compile(ncdoc);
        p3.merge(orthoPn, ncpn);

        final ResourceLocation gsResource = resourceIndex
                .getGeneScaffoldingResource();
        final Document gsdoc = readResource(gsResource);
        p3.pruneGene(gsdoc, orthoPn);
        final ProtoNetwork gspn = p3.compile(gsdoc);
        p3.merge(orthoPn, gspn);
    }
View Full Code Here

        p3.merge(orthoPn, gspn);
    }

    private ProtoNetwork pruneResource(final ProtoNetwork pn,
            final ResourceLocation resource) {
        Document doc = readResource(resource);

        long t1 = currentTimeMillis();

        stageOutput(format("Processing orthology document '%s'", doc.getName()));
        p3.pruneOrthologyDocument(doc, pn);
        final ProtoNetwork opn = p3.compile(doc);

        long t2 = currentTimeMillis();
View Full Code Here

            return null; // Dead code
        }
        if (output.getSymbolWarning() != null) {
            stageError(output.getSymbolWarning().getUserFacingMessage());
        }
        Document doc = output.getDocument();
        return doc;
    }
View Full Code Here

        } catch (ValidationError ve) {
            reportable.error(ve.getUserFacingMessage());
            bail(ExitCode.NO_VALID_DOCUMENTS);
        }

        Document document = null;
        try {
            document = convert(file);
        } catch (ConversionError ce) {
            reportable.error("Failed converting file to BEL model");
            reportable.error(ce.getUserFacingMessage());
View Full Code Here

        }
    }

    private Document convert(final File f) throws ConversionError {
        try {
            Document document = converter.toCommon(f);
            return document;
        } catch (JAXBException e) {
            final String name = f.getAbsolutePath();
            final String msg = e.getMessage();
            final Throwable cause = e;
View Full Code Here

        output.addValidationErrors(validator.validateWithErrors(file));
        if (output.hasValidationErrors()) {
            return output;
        }

        Document d = null;
        try {
            d = converter.toCommon(file);
            output.setDocument(d);
        } catch (JAXBException e) {
            final String name = file.toString();
            final String msg = e.getMessage();
            final Throwable cause = e;
            output.setConversionError(new ConversionError(name, msg, cause));
            return output;
        } catch (IOException e) {
            final String name = file.toString();
            final String msg = e.getMessage();
            final Throwable cause = e;
            output.setConversionError(new ConversionError(name, msg, cause));
            return output;
        }

        List<AnnotationDefinition> definitions = d.getDefinitions();
        if (definitions == null) {
            return output;
        }

        verifyAnnotations(output, d, definitions);
View Full Code Here

                output.addValidationError(ve);
            }
            return output;
        }

        final Document d = belConverter.toCommon(rslts.getDocument());
        output.setDocument(d);

        List<AnnotationDefinition> definitions = d.getDefinitions();
        if (definitions == null) {
            return output;
        }

        verifyAnnotations(output, d, definitions);
View Full Code Here

TOP

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

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.