Package org.openbel.framework.common

Examples of org.openbel.framework.common.InvalidArgument


     * is not found
     * @throws InvalidArgument Thrown if {@code rloc} is {@code null} or empty
     */
    public NamespaceHeader findNamespaceHeader(final String rloc) {
        if (noLength(rloc)) {
            throw new InvalidArgument("rloc", rloc);
        }

        return headers.get(rloc);
    }
View Full Code Here


     */
    public KamNode resolve(final Kam kam, final KAMStore kAMStore,
            final String belTerm, Map<String, String> nsmap,
            Equivalencer equivalencer) throws ResolverException {
        if (nulls(kam, kAMStore, belTerm, nsmap, equivalencer)) {
            throw new InvalidArgument(
                    "null parameter(s) provided to resolve API.");
        }

        try {
            // algorithm:
View Full Code Here

     * BelTerm; exceptions will be wrapped
     */
    public KamNode resolve(final Kam kam, final KAMStore kAMStore,
            final BelTerm belTerm) throws ResolverException {
        if (nulls(kam, kAMStore, belTerm)) {
            throw new InvalidArgument(
                    "null parameter(s) provided to resolve API.");
        }

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

        KamNode kamNode = null;

        try {
View Full Code Here

    public KamEdge resolve(final Kam kam, final KAMStore kAMStore,
            final String subject, final RelationshipType r,
            final String object, Map<String, String> nsmap, Equivalencer eq)
            throws ResolverException {
        if (nulls(kam, kAMStore, subject, r, object, eq)) {
            throw new InvalidArgument(
                    "null parameter(s) provided to resolve API.");
        }

        // resolve subject bel term to kam node.
        final KamNode subjectKamNode = resolve(kam, kAMStore, subject, nsmap, eq);
View Full Code Here

     */
    public KamEdge resolve(final Kam kam, final KAMStore kAMStore,
            final BelTerm subjectBelTerm, final RelationshipType rtype,
            final BelTerm objectBelTerm) throws ResolverException {
        if (nulls(kam, kAMStore, subjectBelTerm, rtype, objectBelTerm)) {
            throw new InvalidArgument(
                    "null parameter(s) provided to resolve API.");
        }

        // resolve subject bel term to kam node.
        final KamNode subjectKamNode = resolve(kam, kAMStore, subjectBelTerm);
View Full Code Here

     */
    OrthologizedKam(Kam kam, SpeciesDialect dialect,
            Map<Integer, TermParameter> ntp, Map<Integer, TermParameter> etp,
            Map<KamNode, KamNode> collapsed) throws KAMStoreException {
        if (nulls(kam, dialect, ntp, etp, collapsed))
            throw new InvalidArgument("parameter(s) are null");
        this.kam = kam;
        this.dialect = dialect;
        this.ntp = ntp;
        this.etp = etp;
        this.collapsed = collapsed;
View Full Code Here

     */
    @Override
    public boolean collapseKamNode(KamNode collapsing, KamNode collapseTo)
            throws SQLException {
        if (collapsing == null)
            throw new InvalidArgument("collapsing node is null");
        if (collapseTo == null)
            throw new InvalidArgument("collapseTo node is null");
        if (collapsing.getKam() == null || collapseTo.getKam() == null
                || collapsing.getKam() != collapseTo.getKam())
            throw new InvalidArgument("nodes reference invalid kams");
        if (collapsing.getId() == null || collapseTo.getId() == null)
            throw new InvalidArgument("node id is null");

        Kam kam = collapsing.getKam();

        PreparedStatement esps = getPreparedStatement(UPDATE_KAM_EDGES_SOURCE);
        PreparedStatement etps = getPreparedStatement(UPDATE_KAM_EDGES_TARGET);
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public int removeKamEdges(int[] edgeIds) throws SQLException {
        if (edgeIds == null)
            throw new InvalidArgument("edgeIds is null");
        if (edgeIds.length == 0)
            return 0;

        int batch = 0;
        int deletes = 0;
View Full Code Here

     */
    @Override
    public int removeKamEdges(RelationshipType relationship)
            throws SQLException {
        if (relationship == null || relationship.getValue() == null)
            throw new InvalidArgument("relationship is null");

        PreparedStatement ps = getPreparedStatement(SELECT_KAM_EDGE_BY_RELATIONSHIP);
        ResultSet rset = null;

        try {
View Full Code Here

public class FileDownloadHandler implements DownloadHandler {

    @Override
    public DownloadFile download(URL url) throws IOException {
        if (url == null) {
            throw new InvalidArgument("url", url);
        }

        URLConnection fileUrlConnection = null;
        FileOutputStream fos = null;
        try {
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.