Package org.jzkit.a2j.codec.util

Examples of org.jzkit.a2j.codec.util.OIDRegisterEntry


    }

    // If we are talking v2, userInformationField may contain a character Set Negotiation
    // field, if v3, otherInfo may contain a charset/language negotiation feature.
    if ( init_request.userInformationField != null ) {
      OIDRegisterEntry ent = reg.lookupByOID(init_request.userInformationField.direct_reference);
      if ( ent != null )
        log.debug("Init Request contains userInformationField oid="+ent.getName());
      else
        log.debug("Unkown external in userInformationField");
        // The OID for the external should be found in userInformationField.direct_reference
    }

    if ( init_request.otherInfo != null ) {
      log.debug("Init Request contains otherInfo entries");
      for ( Iterator other_info_enum = init_request.otherInfo.iterator(); other_info_enum.hasNext(); )
      {
        log.debug("Processing otherInfo entry...");
        // Process the external at other_info_enum.nextElement();
        OtherInformationItem43_type oit = (OtherInformationItem43_type)(other_info_enum.next());

        log.debug("Processing OtherInformationItem43_type");

        switch ( oit.information.which )
        {
          case information_inline44_type.externallydefinedinfo_CID:
            EXTERNAL_type et = (EXTERNAL_type)(oit.information.o);
            if ( et.direct_reference != null )
            {
              OIDRegisterEntry ent = reg.lookupByOID(et.direct_reference);
              log.debug("External with direct reference, oid="+ent.getName());

              // Are we dealing with character set negotiation.
              if ( ent.getName().equals("z_charset_neg_3") )
                handleNLSNegotiation((CharSetandLanguageNegotiation_type)(et.encoding.o));
            }
            break;
          default:
            log.debug("Currently unhandled OtherInformationType");
View Full Code Here


          switch ( c.which )
          {
            case proposedCharSets_inline0_choice1_type.iso10646_CID:
              // The client proposes an iso 10646 id for a character set
              Iso10646_type iso_type = (Iso10646_type)(c.o);
              OIDRegisterEntry ent = reg.lookupByOID(iso_type.encodingLevel);
              log.debug("Client proposes iso10646 charset: "+ent.getName());
              break;
            default:
              log.error("Unhandled character set encoding");
              break;
          }
View Full Code Here

    String pref_recsyn = null;

    if ( search_request.preferredRecordSyntax != null )
    {
      OIDRegisterEntry ent = reg.lookupByOID(search_request.preferredRecordSyntax);
      pref_recsyn = ( ent != null ? ent.getName() : null );
    }

    // switch(search_request.query.which)
    backend.search(new BackendSearchDTO(this,
                                        search_request.query,
View Full Code Here

    String element_set_name = null;
    String result_set_name = present_request.resultSetId;
    String record_syntax = null;

    OIDRegisterEntry ent = reg.lookupByOID(present_request.preferredRecordSyntax);
    if ( ent != null )
      record_syntax = ent.getName();

    if ( ( present_request.recordComposition != null ) &&
         ( present_request.recordComposition.which == recordComposition_inline9_type.simple_CID ) ) {
      element_set_name = extractSetname((ElementSetNames_type)present_request.recordComposition.o);
    }
View Full Code Here

    public boolean decodes(NamePlusRecord_type record)
    {
        if (record.record.which == record_inline13_type.retrievalrecord_CID)
        {
            EXTERNAL_type externalType = (EXTERNAL_type) record.record.o;
            OIDRegisterEntry typeEntry = ProtocolOIDRegister.getInstance().lookupByOID(externalType.direct_reference);

            if (typeEntry != null)
            {
                String name = typeEntry.getName();

                return "unimarc".equals(name) || "usmarc".equals(name) || "marc21".equals(name) || "ukmarc".equals(name) || "normarc".equals(name) || "librismarc".equals(name) || "danmarc".equals(name) || "finmarc".equals(name) || "canmarc".equals(name) || "ausmarc".equals(name) || "ibermarc".equals(name);
            }
        }
View Full Code Here

TOP

Related Classes of org.jzkit.a2j.codec.util.OIDRegisterEntry

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.