Package org.loc.z3950.codec.NegotiationRecordDefinition_charSetandLanguageNegotiation_3

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


     */
    private void handleNLSNegotiation(CharSetandLanguageNegotiation_type neg) {
        LOGGER.finer("Handle Character Set and Language Negotiation");

        if (neg.which == CharSetandLanguageNegotiation_type.proposal_CID) {
            OriginProposal_type op = (OriginProposal_type) (neg.o);

            // Deal with any proposed character sets.
            if (op.proposedCharSets != null) {
                for (Enumeration prop_charsets = op.proposedCharSets.elements();
                        prop_charsets.hasMoreElements();) {
View Full Code Here


            OriginProposal_type proposal = new OriginProposal_type();
            proposal.proposedCharSets = new ArrayList();
            proposal.proposedCharSets.add(proposedCharsets);

            CharSetandLanguageNegotiation_type charsetAndLangNegotiation = new CharSetandLanguageNegotiation_type();
            charsetAndLangNegotiation.which = CharSetandLanguageNegotiation_type.proposal_CID;
            charsetAndLangNegotiation.o = proposal;

            EXTERNAL_type externalType = new EXTERNAL_type();
            externalType.direct_reference = ProtocolOIDRegister.getInstance().oidByName("z_charset_neg_3");
View Full Code Here

         *
         * For now, we just ask for UTF-8 as a charcter set (No language neg.)
         */
        if (this.negotiatingCharset)
        {
            Iso10646_type utf_8_request = new Iso10646_type();
            utf_8_request.encodingLevel = ProtocolOIDRegister.getInstance().oidByName("charset_utf8");

            proposedCharSets_inline0_choice1_type proposedCharsets = new proposedCharSets_inline0_choice1_type();
            proposedCharsets.which = proposedCharSets_inline0_choice1_type.iso10646_CID;
            proposedCharsets.o = utf_8_request;
View Full Code Here

            proposedCharSets_inline0_choice1_type proposedCharsets = new proposedCharSets_inline0_choice1_type();
            proposedCharsets.which = proposedCharSets_inline0_choice1_type.iso10646_CID;
            proposedCharsets.o = utf_8_request;

            OriginProposal_type proposal = new OriginProposal_type();
            proposal.proposedCharSets = new ArrayList();
            proposal.proposedCharSets.add(proposedCharsets);

            CharSetandLanguageNegotiation_type charsetAndLangNegotiation = new CharSetandLanguageNegotiation_type();
            charsetAndLangNegotiation.which = CharSetandLanguageNegotiation_type.proposal_CID;
View Full Code Here

        if (this.negotiatingCharset)
        {
            Iso10646_type utf_8_request = new Iso10646_type();
            utf_8_request.encodingLevel = ProtocolOIDRegister.getInstance().oidByName("charset_utf8");

            proposedCharSets_inline0_choice1_type proposedCharsets = new proposedCharSets_inline0_choice1_type();
            proposedCharsets.which = proposedCharSets_inline0_choice1_type.iso10646_CID;
            proposedCharsets.o = utf_8_request;

            OriginProposal_type proposal = new OriginProposal_type();
            proposal.proposedCharSets = new ArrayList();
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
View Full Code Here

        }
        else if (node instanceof QueryModelAPTNode)
        {
            QueryModelAPTNode aptNode = (QueryModelAPTNode) node;

            AttributesPlusTerm_type attributePlusTerm = new AttributesPlusTerm_type();
            attributePlusTerm.attributes = new ArrayList();

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

        this.message = message;
    }

    public PDU_type produceInitializingRequest() throws ProtocolException
    {
        Close_type closeRequest = new Close_type();
        closeRequest.referenceId = ((this.referenceId == null) ? null : this.referenceId.getBytes());
        closeRequest.closeReason = BigInteger.valueOf(0);
        closeRequest.diagnosticInformation = this.message;

        return toPDU(PDU_type.close_CID, closeRequest);
View Full Code Here

        {
            StringBuffer errorMessage = new StringBuffer("Search failed");

            if ((searchResponse.records != null) && (searchResponse.records.which == Records_type.nonsurrogatediagnostic_CID))
            {
                DefaultDiagFormat_type diagnostics = (DefaultDiagFormat_type) searchResponse.records.o;

                if ((diagnostics != null) && (diagnostics.addinfo != null) && (diagnostics.addinfo.o != null))
                {
                    errorMessage.append(" [condition: " + diagnostics.condition + "; diagnostic: \"" + diagnostics.addinfo.o.toString() + "\"]");
                }
View Full Code Here

        presentRequest.numberOfRecordsRequested = BigInteger.valueOf(this.numOfRecords);
        presentRequest.preferredRecordSyntax = ProtocolOIDRegister.getInstance().lookupByName(this.recordFormat).getValue();

        if (this.elementSetName != null)
        {
            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;
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.