Package org.openbel.framework.common

Examples of org.openbel.framework.common.InvalidArgument


     * {@inheritDoc}
     */
    @Override
    public List<KamNode> getKamNodes(final Kam kam, final KamNode example) {
        if (kam == null) {
            throw new InvalidArgument("kam", kam);
        }

        if (example == null) {
            throw new InvalidArgument("example", example);
        }
        if (!exists(kam)) return null;
        List<KamNode> kamNodeList = new ArrayList<KamNode>();
        try {
            final KAMStoreDao ksdao = kamStoreDao(kam.getKamInfo());
View Full Code Here


     * {@inheritDoc}
     */
    @Override
    public KamNode getKamNodeForTerm(Kam k, String t, FunctionEnum fx,
            SkinnyUUID[] uuids) {
        if (k == null) throw new InvalidArgument("k is null");
        if (t == null) throw new InvalidArgument("t is null");
        if (fx == null) throw new InvalidArgument("fx is null");
        if (uuids == null || uuids.length == 0)
            throw new InvalidArgument("uuids", uuids);

        try {
            final KAMStoreDao dao = kamStoreDao(k.getKamInfo());
            Integer nid = dao.getKamNodeForTerm(t, fx, uuids);
            return nid == null ? null : k.findNode(nid);
View Full Code Here

     */
    @Override
    public List<Citation> getCitations(KamInfo kamInfo,
            BelDocumentInfo belDocumentInfo) {
        if (null == kamInfo) {
            throw new InvalidArgument("kamInfo", kamInfo);
        }
        if (!exists(kamInfo)) return null;

        try {
            return kamStoreDao(kamInfo).getCitations(belDocumentInfo);
View Full Code Here

    @Override
    public List<Citation> getCitations(KamInfo kamInfo,
            BelDocumentInfo docInfo, CitationType type)
            throws InvalidArgument, KAMStoreException {
        if (null == kamInfo) {
            throw new InvalidArgument("kamInfo", kamInfo);
        }
        if (!exists(kamInfo)) return null;
        try {
            return kamStoreDao(kamInfo).getCitations(docInfo, type);
        } catch (SQLException e) {
View Full Code Here

     */
    @Override
    public List<Citation> getCitations(KamInfo kamInfo,
            CitationType citationType) {
        if (null == kamInfo) {
            throw new InvalidArgument("kamInfo", kamInfo);
        }
        if (!exists(kamInfo)) return null;
        try {
            return kamStoreDao(kamInfo).getCitations(citationType);
        } catch (SQLException e) {
View Full Code Here

     */
    @Override
    public List<Citation> getCitations(KamInfo kamInfo,
            CitationType type, String... referenceIds) {
        if (null == kamInfo) {
            throw new InvalidArgument("kamInfo", kamInfo);
        }
        if (!exists(kamInfo)) return null;
        try {
            return kamStoreDao(kamInfo).getCitations(type, referenceIds);
        } catch (SQLException e) {
View Full Code Here

    public KAMStoreDaoImpl(String schemaName, DBConnection dbc)
            throws SQLException {
        super(dbc, schemaName);

        if (dbc == null) {
            throw new InvalidArgument("dbc is null");
        }

        if (dbc.getConnection().isClosed()) {
            throw new InvalidArgument("dbc is closed and cannot be used");
        }
        this.cacheableAnnotationDefinitionService =
                new CacheableAnnotationDefinitionServiceImpl();
    }
View Full Code Here

            return getKamNodeCandidates(namespace, parameterValue);
        }

        // guard against blank parameter value
        if (noLength(parameterValue)) {
            throw new InvalidArgument("parameterValue is blank");
        }

        final Integer objectId = getParameterObjectValueId(parameterValue);
        if (objectId == null) {
            // we couldn't find a string for parameterValue, so return no matches
View Full Code Here

    @Override
    public List<Integer> getKamNodeCandidates(Namespace namespace,
            String parameterValue) throws SQLException {
        // guard against blank parameter value
        if (noLength(parameterValue)) {
            throw new InvalidArgument("parameterValue is blank");
        }

        final Integer objectId = getParameterObjectValueId(parameterValue);
        if (objectId == null) {
            // we couldn't find a string for parameterValue, so return no matches
View Full Code Here

     */
    @Override
    public List<Integer> getKamNodeCandidates(SkinnyUUID uuid)
            throws SQLException {
        if (uuid == null) {
            throw new InvalidArgument("uuid", uuid);
        }
        PreparedStatement ps =
                getPreparedStatement(SELECT_KAM_NODE_IDS_FOR_UUID_SQL);
        ps.setLong(1, uuid.getMostSignificantBits());
        ps.setLong(2, uuid.getLeastSignificantBits());
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.