Package org.loc.z3950.codec.Z39_50_APDU_1995

Examples of org.loc.z3950.codec.Z39_50_APDU_1995.PDU_type


        // TODO Auto-generated method stub
    }

    public void process(PDU_type pdu) throws ProtocolException
    {
        SearchResponse_type searchResponse = (SearchResponse_type) pdu.o;

        if (!searchResponse.searchStatus)
        {
            StringBuffer errorMessage = new StringBuffer("Search failed");
View Full Code Here


    public boolean processes(PDU_type pdu)
    {
        if (pdu.which == PDU_type.searchresponse_CID)
        {
            SearchResponse_type searchResponse = (SearchResponse_type) pdu.o;

            if (!this.referenceId.equals(DEFAULT_REFERENCE_ID) && (searchResponse.referenceId != null))
            {
                return this.referenceId.equals(new String(searchResponse.referenceId));
            }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public PDU_type produceInitializingRequest() throws ProtocolException
    {
        SortRequest_type sortRequest = new SortRequest_type();
        sortRequest.referenceId = this.referenceId.getBytes();
        sortRequest.inputResultSetNames = new ArrayList(this.resultSetsToSort);
        sortRequest.sortedResultSetName = this.sortedResultSetName;
        sortRequest.sortSequence = new ArrayList(this.attributesToSort);
View Full Code Here

                    attributeElement.attributeValue.which = attributeValue_inline3_type.numeric_CID;
                    attributeElement.attributeValue.o = BigInteger.valueOf(((BigInteger) attributeTriple.attributeValue).intValue());
                }
                else if (attributeTriple.attributeValue instanceof String)
                {
                    StringOrNumeric_type son = new StringOrNumeric_type();
                    son.which = StringOrNumeric_type.string_CID;
                    son.o = attributeTriple.attributeValue.toString();

                    complex_inline4_type cit = new complex_inline4_type();
                    cit.list = new ArrayList();
View Full Code Here

            try
            {
                /*
                 * Add new AttributeElement members for each attribute.
                 */
                attributePlusTerm.term = new Term_type();
                attributePlusTerm.term.which = Term_type.general_CID;
                attributePlusTerm.term.o = aptNode.getTerm().toString().getBytes(encoding);
            }
            catch (java.io.UnsupportedEncodingException e)
            {
View Full Code Here

            for (String attributeId : aptNode.getAttributes().keySet())
            {
                Type1AttributeTriple attributeTriple = Type1AttributeTriple.parse(aptNode.getAttribute(attributeId).toString());

                AttributeElement_type attributeElement = new AttributeElement_type();
                attributeElement.attributeValue = new attributeValue_inline3_type();
                attributeElement.attributeType = BigInteger.valueOf(attributeTriple.attributeType);

                /*
                 * Use OID registry to lookup attr set oid if one is present. Don't fill out element attrset if it's the
                 * same as default attrset
View Full Code Here

                {
                    StringOrNumeric_type son = new StringOrNumeric_type();
                    son.which = StringOrNumeric_type.string_CID;
                    son.o = attributeTriple.attributeValue.toString();

                    complex_inline4_type cit = new complex_inline4_type();
                    cit.list = new ArrayList();
                    cit.list.add(son);

                    attributeElement.attributeValue.which = attributeValue_inline3_type.complex_CID;
                    attributeElement.attributeValue.o = cit;
View Full Code Here

        case AuthenticationMethod.AUTH_TYPE_ID_PASS:
            initRequest.idAuthentication = new IdAuthentication_type();
            initRequest.idAuthentication.which = IdAuthentication_type.idpass_CID;

            idPass_inline0_type idpass = new idPass_inline0_type();
            idpass.groupId = authenticationMethod.getGroupId();
            idpass.userId = authenticationMethod.getUserId();
            idpass.password = authenticationMethod.getCredentials();
            initRequest.idAuthentication.o = idpass;
View Full Code Here

            externalType.encoding = new encoding_inline0_type();
            externalType.encoding.which = encoding_inline0_type.single_asn1_type_CID;
            externalType.encoding.o = charsetAndLangNegotiation;

            OtherInformationItem43_type otherInfo = new OtherInformationItem43_type();
            otherInfo.information = new information_inline44_type();
            otherInfo.information.which = information_inline44_type.externallydefinedinfo_CID;
            otherInfo.information.o = externalType;

            if (initRequest.otherInfo == null)
            {
View Full Code Here

        {
            ElementSetNames_type elementSetNameType = new ElementSetNames_type();
            elementSetNameType.which = ElementSetNames_type.genericelementsetname_CID;
            elementSetNameType.o = this.elementSetName;

            presentRequest.recordComposition = new recordComposition_inline9_type();
            presentRequest.recordComposition.which = recordComposition_inline9_type.simple_CID;
            presentRequest.recordComposition.o = elementSetNameType;
        }

        return toPDU(PDU_type.presentrequest_CID, presentRequest);
View Full Code Here

TOP

Related Classes of org.loc.z3950.codec.Z39_50_APDU_1995.PDU_type

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.