Package org.openbel.framework.common.model

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


     * {@code SEQUENTIAL_FUNCTION(EGID:207, EGID:208)}<br>
     * </p>
     */
    @Test
    public void testSequentialMatchEquivalent() {
        final Namespace hgnc =
                new Namespace(
                        "HGNC",
                        "http://resource.belframework.org/belframework/1.0/namespace/hgnc-approved-symbols.belns");
        final Namespace egid =
                new Namespace(
                        "EGID",
                        "http://resource.belframework.org/belframework/1.0/namespace/entrez-gene-ids-hmr.belns");

        for (final FunctionEnum f : values()) {
            if (f.isSequential()) {
View Full Code Here


     * {@code SEQUENTIAL_FUNCTION(EGID:208, EGID:207)}<br>
     * </p>
     */
    @Test
    public void testSequentialMismatchUnequivalent() {
        final Namespace hgnc =
                new Namespace(
                        "HGNC",
                        "http://resource.belframework.org/belframework/1.0/namespace/hgnc-approved-symbols.belns");
        final Namespace egid =
                new Namespace(
                        "EGID",
                        "http://resource.belframework.org/belframework/1.0/namespace/entrez-gene-ids-hmr.belns");

        for (final FunctionEnum f : values()) {
            if (f.isSequential()) {
View Full Code Here

     * {@code NON_SEQUENTIAL_FUNCTION(EGID:208, EGID:207)}<br>
     * </p>
     */
    @Test
    public void testUnconsecutiveMatchEquivalent() {
        final Namespace hgnc =
                new Namespace(
                        "HGNC",
                        "http://resource.belframework.org/belframework/1.0/namespace/hgnc-approved-symbols.belns");
        final Namespace egid =
                new Namespace(
                        "EGID",
                        "http://resource.belframework.org/belframework/1.0/namespace/entrez-gene-ids-hmr.belns");

        for (final FunctionEnum f : values()) {
            if (!f.isSequential()) {
View Full Code Here

     * {@code NON_SEQUENTIAL_FUNCTION(EGID:171, EGID:207)}<br>
     * </p>
     */
    @Test
    public void testUnconsecutiveMismatchUnequivalent() {
        final Namespace hgnc =
                new Namespace(
                        "HGNC",
                        "http://resource.belframework.org/belframework/1.0/namespace/hgnc-approved-symbols.belns");
        final Namespace egid =
                new Namespace(
                        "EGID",
                        "http://resource.belframework.org/belframework/1.0/namespace/entrez-gene-ids-hmr.belns");

        for (final FunctionEnum f : values()) {
            if (!f.isSequential()) {
View Full Code Here

        if (nsFileUrl == null) {
            fail("Cannot read namespace location: " + nsFileUrl);
        }

        final Parameter p = CommonModelFactory.getInstance().createParameter(
                new Namespace("COMPLEX", nsFileUrl),
                "Propionyl Coa Carboxylase Complex");

        try {
            namespaceService.verify(p);
        } catch (NamespaceSyntaxWarning e) {
View Full Code Here

    public Namespace convert(BELNamespaceDefinition bnd) {
        if (bnd == null) {
            return null;
        }

        return new Namespace(bnd.getPrefix(), bnd.getResourceLocation());
    }
View Full Code Here

    }

    protected void repopulateNamespaces(final Statement statement) {
        if (hasItems(statement.getAllParameters())) {
            for (Parameter p : statement.getAllParameters()) {
                Namespace ns = p.getNamespace();
                if (ns != null) {
                    String prefix = ns.getPrefix();
                    Namespace namespace = ndefs.get(prefix);

                    if (namespace == null) {
                        continue;
                    }
View Full Code Here

                ret.put(ns.getPrefix(), ns);
        }

        final String defns = nsgroup.getDefaultResourceLocation();
        if (defns != null) {
            Namespace ns = new Namespace(DEFAULT_NAMESPACE_PREFIX, defns);
            ret.put(DEFAULT_NAMESPACE_PREFIX, ns);
        }

        return ret;
    }
View Full Code Here

    public Namespace convert(XBELNamespace source) {
        if (source == null) return null;

        String prefix = source.getPrefix();
        String resourceLocation = source.getResourceLocation();
        Namespace dest = new Namespace(prefix, resourceLocation);
        return dest;
    }
View Full Code Here

        // Destination type
        Parameter dest = new Parameter();

        if (source.isSetNs()) {
            String prefix = source.getNs();
            Namespace ns = new Namespace(prefix, UNRESOVLED_NS);
            dest.setNamespace(ns);
        }

        if (source.isSetValue()) {
            dest.setValue(CommonModelFactory.getInstance().resolveValue(
View Full Code Here

TOP

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

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.