Package org.openbel.framework.common

Examples of org.openbel.framework.common.InvalidArgument


     *             equivalences
     */
    public Map<Namespace, String> equivalence(final Namespace sourceNamespace,
            final String sourceValue) throws EquivalencerException {
        if (sourceNamespace == null) {
            throw new InvalidArgument("sourceNamespace", sourceNamespace);
        }

        if (noLength(sourceValue)) {
            throw new InvalidArgument("sourceValue", sourceValue);
        }

        loadEquivalencingEngine();

        final Parameter sp = new Parameter(sourceNamespace, sourceValue);
View Full Code Here


     *             equivalences
     */
    public String equivalence(SkinnyUUID sourceUUID, Namespace targetNamespace)
            throws EquivalencerException {
        if (sourceUUID == null) {
            throw new InvalidArgument("sourceUUID", sourceUUID);
        }

        if (targetNamespace == null) {
            throw new InvalidArgument("targetNamespace", targetNamespace);
        }

        loadEquivalencingEngine();

        try {
View Full Code Here

     *             equivalences
     */
    public Map<Namespace, String> equivalence(SkinnyUUID sourceUUID)
            throws EquivalencerException {
        if (sourceUUID == null) {
            throw new InvalidArgument("sourceUUID", sourceUUID);
        }

        loadEquivalencingEngine();

        try {
View Full Code Here

     * @param dialect The {@link Dialect} to apply. Must not be <code>null</code>.
     * @throws InvalidArgument Thrown if the provided {@link Kam} or {@link Dialect} is <code>null</code>.
     */
    public KamDialect(Kam kam, Dialect dialect) throws InvalidArgument {
        if (kam == null) {
            throw new InvalidArgument("Kam must not be null");
        }
        if (dialect == null) {
            throw new InvalidArgument("Dialect must not be null");
        }
        this.kam = kam;
        this.dialect = dialect;
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public SimplePath[] findPaths(KamNode source, KamNode target) {
        if (source == null) {
            throw new InvalidArgument("source", source);
        }
        if (target == null) {
            throw new InvalidArgument("target", target);
        }

        Kam srcKAM = source.getKam();
        Kam tgtKAM = target.getKam();

        if (!sameKAMs(srcKAM, tgtKAM)) {
            throw new InvalidArgument("Source/target KAMs are not equal");
        }

        return findPaths(srcKAM, source, target);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public SimplePath[] findPaths(KamNode[] sources, KamNode[] targets) {
        if (noItems(sources)) {
            throw new InvalidArgument("sources", sources);
        }
        if (noItems(targets)) {
            throw new InvalidArgument("targets", targets);
        }
        if (nulls((Object[]) sources)) {
            throw new InvalidArgument("Source nodes contains null elements");
        }
        if (nulls((Object[]) targets)) {
            throw new InvalidArgument("Target nodes contains null elements");
        }

        KamNode[] nodes = concat(sources, targets);
        Kam[] kams = kams(nodes);
        if (!sameKAMs(kams)) {
            throw new InvalidArgument("Source/target KAMs are not equal");
        }

        return findPaths(kams[0], sources, targets);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public SimplePath[] interconnect(KamNode[] nodes) {
        if (noItems(nodes)) {
            throw new InvalidArgument("nodes", nodes);
        }
        if (nulls((Object[]) nodes)) {
            throw new InvalidArgument("Nodes contains null elements");
        }

        Kam[] kams = kams(nodes);
        if (!sameKAMs(kams)) {
            throw new InvalidArgument("Node KAMs are not equal");
        }

        return interconnect(kams[0], nodes);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public SimplePath[] scan(KamNode source) {
        if (source == null) {
            throw new InvalidArgument("source", source);
        }

        Kam kam = source.getKam();
        return scan(kam, source);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public SimplePath[] scan(KamNode[] sources) {
        if (noItems(sources)) {
            throw new InvalidArgument("sources", sources);
        }
        if (nulls((Object[]) sources)) {
            throw new InvalidArgument("Source nodes contains null elements");
        }

        Kam[] kams = kams(sources);
        if (!sameKAMs(kams)) {
            throw new InvalidArgument("Source KAMs are not equal");
        }

        return scan(kams[0], sources);
    }
View Full Code Here

     * @return
     * @throws InvalidArgument Thrown if {@code kam} is null
     */
    public static Kam newInstance(Kam kam) {
        if (kam == null) {
            throw new InvalidArgument("kam", kam);
        }
        return new KamImpl(kam.getKamInfo());
    }
View Full Code Here

TOP

Related Classes of org.openbel.framework.common.InvalidArgument

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.