Examples of OIDRegisterEntry


Examples of com.k_int.codec.util.OIDRegisterEntry

    public GeoZServerAssociation(Socket s, Properties p) {
        //TODO: put this in nicer place...this is just a hack to get old html
        //oid working...should do something like Isite where it translates
        //old oids into the new ones.
        OIDRegisterEntry html = new OIDRegisterEntry("html",
                "{1,2,840,10003,5,1000,34,1}", "record format", null);
        reg.register_oid(html);

        //to generate search tasks.
        this.search_service = (Searchable) new GeoSearchable();
View Full Code Here

Examples of com.k_int.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) {
                LOGGER.finer("Init Request contains userInformationField oid="
                    + ent.getName());
            } else {
                LOGGER.finer("Unkown external in userInformationField");
            }

            // The OID for the external should be found
            //in userInformationField.direct_reference
        }

        if (init_request.otherInfo != null) {
            LOGGER.finer("Init Request contains otherInfo entries");

            for (Enumeration other_info_enum = init_request.otherInfo.elements();
                    other_info_enum.hasMoreElements();) {
                LOGGER.finer("Processing otherInfo entry...");

                // Process the external at other_info_enum.nextElement();
                OtherInformationItem43_type oit = (OtherInformationItem43_type) (other_info_enum
                    .nextElement());

                LOGGER.finer("Processing OtherInformationItem43_type");

                switch (oit.information.which) {
                case information_inline45_type.externallydefinedinfo_CID:

                    EXTERNAL_type et = (EXTERNAL_type) (oit.information.o);

                    if (et.direct_reference != null) {
                        OIDRegisterEntry ent = reg.lookupByOID(et.direct_reference);
                        LOGGER.finer("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;
View Full Code Here

Examples of com.k_int.codec.util.OIDRegisterEntry

                    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);
                        LOGGER.finer("Client proposes iso10646 charset: "
                            + ent.getName());

                        break;

                    default:
                        LOGGER.warning("Unhandled character set encoding");
View Full Code Here

Examples of com.k_int.codec.util.OIDRegisterEntry

            Vector v = new Vector();
            retval.which = Records_type.responserecords_CID;
            retval.o = v;

            OIDRegisterEntry requested_syntax = null;
            String requested_syntax_name = null;

            if (preferredRecordSyntax != null) {
                requested_syntax = reg.lookupByOID(preferredRecordSyntax);

                if (requested_syntax == null) { // unsupported record syntax

                    StringBuffer oid = new StringBuffer();

                    for (int i = 0; i < preferredRecordSyntax.length; i++) {
                        if (i != 0) {
                            oid.append('.');
                        }

                        oid.append(preferredRecordSyntax[i]);
                    }

                    LOGGER.warning("Unsupported preferredRecordSyntax="
                        + oid.toString());

                    // Need to set up diagnostic in here
                    retval.which = Records_type.nonsurrogatediagnostic_CID;

                    DefaultDiagFormat_type default_diag = new DefaultDiagFormat_type();
                    retval.o = default_diag;

                    default_diag.diagnosticSetId = reg.oidByName("diag-1");
                    default_diag.condition = BigInteger.valueOf(239);
                    default_diag.addinfo = new addinfo_inline14_type();
                    default_diag.addinfo.which = addinfo_inline14_type.v2addinfo_CID;
                    default_diag.addinfo.o = (Object) (oid.toString());

                    return retval;
                }

                LOGGER.finer("requested_syntax=" + requested_syntax);
                requested_syntax_name = requested_syntax.getName();

                if (requested_syntax_name.equals("usmarc")) {
                    //HACK!  USMARC not yet supported...
                    requested_syntax_name = "sutrs";
                }
View Full Code Here

Examples of com.k_int.codec.util.OIDRegisterEntry

            if (this.search_service instanceof Scanable) {
                Scanable s = (Scanable) this.search_service;

                if (s.isScanSupported()) {
                    String name = null;
                    OIDRegisterEntry ent = reg.lookupByOID(scan_request.attributeSet);

                    if (ent != null) {
                        name = ent.getName();
                    }

                    RootNode rn = new RootNode();

                    int i1 = ((scan_request.stepSize == null) ? 0
View Full Code Here

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

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

          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

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

    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

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

    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

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

    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
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.