Package org.loc.z3950.codec.NegotiationRecordDefinition_charSetandLanguageNegotiation_3

Examples of org.loc.z3950.codec.NegotiationRecordDefinition_charSetandLanguageNegotiation_3.OriginProposal_type


            searchRequest.mediumSetPresentNumber = BigInteger.valueOf(mediumSetPresentNumber);
            searchRequest.replaceIndicator = Boolean.TRUE;
            searchRequest.resultSetName = resultSetName;
            searchRequest.databaseNames = new ArrayList(query.getDatabases());
            searchRequest.preferredRecordSyntax = ProtocolOIDRegister.getInstance().oidByName(this.recordSyntax);
            searchRequest.smallSetElementSetNames = new ElementSetNames_type();
            searchRequest.smallSetElementSetNames.which = ElementSetNames_type.genericelementsetname_CID;
            searchRequest.smallSetElementSetNames.o = smallSetElementNames;
            searchRequest.mediumSetElementSetNames = new ElementSetNames_type();
            searchRequest.mediumSetElementSetNames.which = ElementSetNames_type.genericelementsetname_CID;
            searchRequest.mediumSetElementSetNames.o = mediumSetElementNames;
            searchRequest.query = Type1Encoder.encode(query, "utf-8");

            return toPDU(PDU_type.searchrequest_CID, searchRequest);
View Full Code Here


         * Add authentication data.
         */
        switch (authenticationMethod.getAuthType())
        {
        case AuthenticationMethod.AUTH_TYPE_ANONYMOUS:
            initRequest.idAuthentication = new IdAuthentication_type();
            initRequest.idAuthentication.which = IdAuthentication_type.anonymous_CID;

            break;

        case AuthenticationMethod.AUTH_TYPE_ID_OPEN:
            initRequest.idAuthentication = new IdAuthentication_type();
            initRequest.idAuthentication.which = IdAuthentication_type.open_CID;
            initRequest.idAuthentication.o = authenticationMethod.getUserId();

            break;

        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();
View Full Code Here

        options.setBit(14); // Named result sets

        /*
         * Basic INIT request setup.
         */
        InitializeRequest_type initRequest = new InitializeRequest_type();
        initRequest.protocolVersion = versionInfo;
        initRequest.options = options;
        initRequest.preferredMessageSize = BigInteger.valueOf(this.preferredMessageSize);
        initRequest.exceptionalRecordSize = BigInteger.valueOf(this.exceptionalMessageSize);
        initRequest.referenceId = null;
View Full Code Here

        return referenceId;
    }

    public void process(PDU_type pdu) throws ProtocolException
    {
        InitializeResponse_type initResponse = (InitializeResponse_type) pdu.o;

        if (initResponse.result)
        {
            this.targetInformation = new TargetInformation();
            this.targetInformation.setImplementationId(initResponse.implementationId);
View Full Code Here

            {
                logger.warn("Problem converting search string to requested encoding", e);
                attributePlusTerm.term.o = aptNode.getTerm().toString().getBytes();
            }

            Operand_type operand = new Operand_type();
            operand.which = Operand_type.attrterm_CID;
            operand.o = attributePlusTerm;

            rpnStructure = new RPNStructure_type();
            rpnStructure.which = RPNStructure_type.op_CID;
View Full Code Here

            QueryModelComplexNode complexNode = (QueryModelComplexNode) node;

            rpnRpnOp_inline2_type rpnOp = new rpnRpnOp_inline2_type();
            rpnOp.rpn1 = createRPNStructure(complexNode.getLhs(), encoding, defaultNamespace);
            rpnOp.rpn2 = createRPNStructure(complexNode.getRhs(), encoding, defaultNamespace);
            rpnOp.op = new Operator_type();

            switch (complexNode.getOp())
            {
            case QueryModelComplexNode.COMPLEX_OP_AND:
                rpnOp.op.which = Operator_type.and_CID;
View Full Code Here

            externalType.direct_reference = ProtocolOIDRegister.getInstance().oidByName("z_charset_neg_3");
            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

        return this.errorException != null;
    }

    protected PDU_type toPDU(int pduType, Object pduObject)
    {
        PDU_type pdu = new PDU_type();
        pdu.which = pduType;
        pdu.o = pduObject;

        return pdu;
    }
View Full Code Here

    @Override
    public void doRegularTask()
    {
        try
        {
            PDU_type pdu = null;

            BERInputStream input = new BERInputStream(inputStream, charsetEncoding, DEFAULT_BUFFER_SIZE, ProtocolOIDRegister.getInstance());
            pdu = (PDU_type) PDU_codec.getCodec().serialize(input, pdu, false, "PDU");
            logger.debug("Received " + ToStringBuilder.reflectionToString(pdu));
View Full Code Here

            synchronized (protocolHandler)
            {
                try
                {
                    PDU_type pdu = protocolHandler.produceInitializingRequest();

                    logger.debug("Sending " + ToStringBuilder.reflectionToString(pdu));

                    BEROutputStream encoder = new BEROutputStream(DEFAULT_BUFFER_SIZE, charsetEncoding, ProtocolOIDRegister.getInstance());
                    PDU_codec.getCodec().serialize(encoder, protocolHandler.produceInitializingRequest(), false, "PDU");
View Full Code Here

TOP

Related Classes of org.loc.z3950.codec.NegotiationRecordDefinition_charSetandLanguageNegotiation_3.OriginProposal_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.