Examples of Bio


Examples of org.dspace.authority.orcid.model.Bio

        if (XMLErrors.check(xml)) {

            try {
                Iterator<Node> iterator = XMLUtils.getNodeListIterator(xml, ORCID_BIO);
                while (iterator.hasNext()) {
                    Bio bio = convertBio(iterator.next());
                    result.add(bio);
                }
            } catch (XPathExpressionException e) {
                log.error("Error in xpath syntax", e);
            }
View Full Code Here

Examples of org.dspace.authority.orcid.model.Bio

        return result;
    }

    private Bio convertBio(Node node) {
        Bio bio = new Bio();

        setOrcid(node,bio);
        setPersonalDetails(node, bio);
        setContactDetails(node, bio);
        setKeywords(node, bio);
View Full Code Here

Examples of org.dspace.authority.orcid.model.Bio

    }

    public Bio getBio(String id) {
        Document bioDocument = restConnector.get(id + "/orcid-bio");
        XMLtoBio converter = new XMLtoBio();
        Bio bio = converter.convert(bioDocument).get(0);
        bio.setOrcid(id);
        return bio;
    }
View Full Code Here

Examples of org.dspace.authority.orcid.model.Bio

        return authorities;
    }

    @Override
    public AuthorityValue queryAuthorityID(String id) {
        Bio bio = getBio(id);
        return OrcidAuthorityValue.create(bio);
    }
View Full Code Here

Examples of org.jruby.ext.openssl.impl.BIO

            }
            return this;
        }
        arg = args[0];
        arg = OpenSSLImpl.to_der_if_possible(arg);
        BIO input = obj2bio(arg);
        try {
            p7 = org.jruby.ext.openssl.impl.PKCS7.readPEM(input);
            if (p7 == null) {
                input.reset();
                p7 = org.jruby.ext.openssl.impl.PKCS7.fromASN1(input);
            }
        } catch (IOException ioe) {
            throw newPKCS7Error(getRuntime(), ioe.getMessage());
        } catch (PKCS7Exception pkcs7e) {
View Full Code Here

Examples of org.jruby.ext.openssl.impl.BIO

            } catch (PKCS7Exception pkcs7e) {
                throw newPKCS7Exception(getRuntime(), pkcs7e);
            }
        }
       
        BIO in = obj2bio(obj);
        BIO out = null;
        try {
            out = p7.dataInit(null);
        } catch (PKCS7Exception pkcs7e) {
            throw newPKCS7Exception(getRuntime(), pkcs7e);
        }
        byte[] buf = new byte[4096];
        for(;;) {
            try {
                int i = in.read(buf, 0, buf.length);
                if(i <= 0) {
                    break;
                }
                if(out != null) {
                    out.write(buf, 0, i);
                }
            } catch(IOException e) {
                throw getRuntime().newIOErrorFromException(e);
            }
        }
View Full Code Here

Examples of org.jruby.ext.openssl.impl.BIO

        if(indata.isNil()) {
            indata = getData();
        }

        BIO in = indata.isNil() ? null : obj2bio(indata);

        List<X509AuxCertificate> x509s = certs.isNil()
            ? null
            : x509_ary2sk(certs);

        Store x509st = ((X509Store)store).getStore();
        BIO out = BIO.mem();

        boolean result = false;
        try {
            p7.verify(x509s, x509st, in, out, flg);
            result = true;
View Full Code Here

Examples of org.jruby.ext.openssl.impl.BIO

        IRubyObject cert = args[1];
        PrivateKey key = ((PKey)pkey).getPrivateKey();
        X509AuxCertificate x509 = ((X509Cert)cert).getAuxCert();
        int flg = dflags.isNil() ? 0 : RubyNumeric.fix2int(dflags);

        BIO out = BIO.mem();
        try {
            p7.decrypt(key, x509, out, flg);
        } catch (PKCS7Exception pkcs7e) {
            throw newPKCS7Exception(getRuntime(), pkcs7e);
        }
View Full Code Here

Examples of org.jruby.ext.openssl.impl.BIO

    }

    public static class ModuleMethods {
        @JRubyMethod(meta=true)
        public static IRubyObject read_smime(IRubyObject klass, IRubyObject arg) {
            BIO in = obj2bio(arg);
            BIO[] out = new BIO[]{null};
            org.jruby.ext.openssl.impl.PKCS7 pkcs7 = null;
            try {
                pkcs7 = new SMIME(Mime.DEFAULT).readPKCS7(in, out);
            } catch (IOException ioe) {
View Full Code Here

Examples of org.jruby.ext.openssl.impl.BIO

            X509AuxCertificate x509 = ((X509Cert)cert).getAuxCert();
            PrivateKey pkey = ((PKey)key).getPrivateKey();
            int flg = flags.isNil() ? 0 : RubyNumeric.fix2int(flags);

            BIO in = obj2bio(data);

            List<X509AuxCertificate> x509s = certs.isNil()
                ? null
                : x509_ary2sk(certs);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.