Package org.openbel.framework.common

Examples of org.openbel.framework.common.InvalidArgument


     * {@code null}
     * @throws InvalidArgument Thrown if {@code downloadedFile} is {@code null}
     */
    protected DownloadFile(final File downloadedFile) {
        if (downloadedFile == null) {
            throw new InvalidArgument("downloadedFile", downloadedFile);
        }

        this.downloadedFile = downloadedFile;
        this.checksum = null;
    }
View Full Code Here


     * downloaded file contents
     * @throws InvalidArgument Thrown if {@code downloadedFile} is {@code null}
     */
    protected DownloadFile(final File downloadedFile, final String checksum) {
        if (downloadedFile == null) {
            throw new InvalidArgument("downloadedFile", downloadedFile);
        }

        this.downloadedFile = downloadedFile;
        this.checksum = checksum;
    }
View Full Code Here

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

        final HttpURLConnection huc = (HttpURLConnection) url.openConnection();
        FileOutputStream fos = null;
        try {
View Full Code Here

     * @return the {@link Integer proto node index}
     * @throws InvalidArgument Thrown if {@code label} is {@code null}
     */
    public Integer addNode(final int termIndex, final String label) {
        if (label == null) {
            throw new InvalidArgument("label", label);
        }

        // if we have already seen this term index, return
        Integer visitedIndex = termNodeIndex.get(termIndex);
        if (visitedIndex != null) {
View Full Code Here

     * {@code terms} set, which cannot be null
     * @throws InvalidArgument Thrown if {@code term} is null
     */
    public int addTerm(Term term) {
        if (term == null) {
            throw new InvalidArgument("term is null");
        }

        // if we have already seen this term, return its index
        Integer visitedIndex = visitedTerms.get(term);
        if (visitedIndex != null) {
View Full Code Here

     */
    public static Kam createKam(final KamInfo testKamInfo,
            final TestKamNode[] testKamNodes,
            final TestKamEdge[] testKamEdges) {
        if (testKamNodes == null) {
            throw new InvalidArgument("testKamNodes", testKamNodes);
        }

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

        KamImpl testKAM = new KamImpl(testKamInfo);

        Map<TestKamNode, KamNode> newNodes =
View Full Code Here

    private Map<Integer, SkinnyUUID> globalUUIDs =
            new HashMap<Integer, SkinnyUUID>();

    public int addTableParameter(TableParameter parameter) {
        if (parameter == null) {
            throw new InvalidArgument("parameter is null");
        }

        if (parameters.add(parameter)) {
            int nextIndex = parameterIndex.size();
View Full Code Here

        private/* final */int hash;

        public TableParameter(String value) {
            if (value == null) {
                throw new InvalidArgument("value is null.");
            }

            this.namespace = null;
            this.value = value;
            this.hash = computeHash();
View Full Code Here

            this.hash = computeHash();
        }

        public TableParameter(TableNamespace namespace, String value) {
            if (namespace == null) {
                throw new InvalidArgument("namespace is null.");
            }

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

            this.namespace = namespace;
            this.value = value;
            this.hash = computeHash();
View Full Code Here

    public String equivalence(final Namespace sourceNamespace,
            final String sourceValue, final Namespace targetNamespace)
            throws EquivalencerException {

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

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

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

        loadEquivalencingEngine();

        // convert namespace and value to parameter (common model).
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.