Examples of PositiveInteger


Examples of ome.xml.model.primitives.PositiveInteger

          String transmittance = channel.filter.substring(space + 1).trim();
          String[] v = transmittance.split("-");
          try {
            Integer cutIn = new Integer(v[0].trim());
            PositiveInteger in = FormatTools.getCutIn(cutIn);
            if (in != null) {
              store.setTransmittanceRangeCutIn(in, instrument, nextFilter);
            }
          }
          catch (NumberFormatException e) { }
          if (v.length > 1) {
            try {
              Integer cutOut = new Integer(v[1].trim());
              PositiveInteger out = FormatTools.getCutOut(cutOut);
              if (out != null) {
                store.setTransmittanceRangeCutOut(out, instrument, nextFilter);
              }
            }
            catch (NumberFormatException e) { }
          }
        }

        nextFilter++;
      }
      if (channel.channelName != null) {
        String detectorID =
          MetadataTools.createLSID("Detector", instrument, nextDetector);
        store.setDetectorID(detectorID, instrument, nextDetector);
        if (channel.acquire && nextDetector < getSizeC()) {
          store.setDetectorSettingsID(detectorID, series, nextDetector);
          //store.setDetectorSettingsBinning(
          //  getBinning(binning), series, nextDetector);
        }
      }
      if (channel.amplificationGain != null) {
        store.setDetectorAmplificationGain(
          channel.amplificationGain, instrument, nextDetector);
      }
      if (channel.gain != null) {
        store.setDetectorGain(channel.gain, instrument, nextDetector);
      }
      store.setDetectorType(getDetectorType("PMT"), instrument, nextDetector);
      store.setDetectorZoom(zoom, instrument, nextDetector);
      nextDetectChannel++;
      nextDetector++;
    }
    else if (block instanceof BeamSplitter) {
      BeamSplitter beamSplitter = (BeamSplitter) block;
      if (beamSplitter.filterSet != null) {
        if (beamSplitter.filter != null) {
          String id = MetadataTools.createLSID(
            "Dichroic", instrument, nextDichroic);
          store.setDichroicID(id, instrument, nextDichroic);
          store.setDichroicModel(beamSplitter.filter, instrument, nextDichroic);
          if (nextDichroicChannel < getEffectiveSizeC()) {
            //store.setLightPathDichroicRef(id, series, nextDichroicChannel);
          }
          nextDichroic++;
        }
        nextDichroicChannel++;
      }
    }
    else if (block instanceof IlluminationChannel) {
      IlluminationChannel channel = (IlluminationChannel) block;
      if (channel.acquire && channel.wavelength != null &&
        channel.wavelength > 0)
      {
        PositiveInteger wave = FormatTools.getWavelength(channel.wavelength);
        if (wave != null) {
          store.setLaserWavelength(wave, instrument, nextIllumChannel);
        }
        if (nextIllumChannel >= nextLaser) {
          String lightSourceID = MetadataTools.createLSID(
View Full Code Here

Examples of org.apache.axis.types.PositiveInteger

            + out + " expected : " + in, in, out);
    }

    public void testPositiveInteger() throws Exception {
        // Test xsd:positiveInteger
        PositiveInteger in = new PositiveInteger("12345678900987654321");
        PositiveInteger out = binding.echoPositiveInteger(in);
        assertEquals("echoPositiveInteger : incorrect return value : "
            + out + " expected : " + in, in, out);
    }
View Full Code Here

Examples of org.apache.axis.types.PositiveInteger

                    new NegativeInteger("-12345678901234567890"), true);
    }

    public void testPositiveInteger() throws Exception {
        deserialize("<result xsi:type=\"xsd:positiveInteger\">12345678901234567890</result>",
                    new PositiveInteger("12345678901234567890"), true);
    }
View Full Code Here

Examples of org.apache.axis.types.PositiveInteger

                throw e;
            }
        }

        // Test xsd:positiveInteger
        PositiveInteger piInput = new PositiveInteger("12345678901234567890");
        try {
            output = binding.echoPositiveInteger(piInput);
            verify("echoPositiveInteger", piInput, output);
        } catch (Exception e) {
            if (!testMode) {
View Full Code Here

Examples of org.apache.axis.types.PositiveInteger

                throw e;
            }
        }

        // Test xsd:positiveInteger
        PositiveInteger piInput = new PositiveInteger("12345678901234567890");
        try {
            output = binding.echoPositiveInteger(piInput);
            verify("echoPositiveInteger", piInput, output);
        } catch (Exception e) {
            if (!testMode) {
View Full Code Here

Examples of org.apache.axis.types.PositiveInteger

            SearchRetrieveRequestType request=new SearchRetrieveRequestType();
            request.setVersion("1.1");
            request.setQuery("en and education");
            //request.setQuery("dc.title any sword");
            request.setRecordSchema("info:srw/schema/1/dc-v1.1");
            request.setStartRecord(new PositiveInteger("1"));
            request.setMaximumRecords(new NonNegativeInteger("1"));
            request.setRecordPacking("xml");
            SearchRetrieveResponseType response=
                port.searchRetrieveOperation(request);
            System.out.println("postings="+response.getNumberOfRecords());
View Full Code Here

Examples of org.apache.axis.types.PositiveInteger

            SearchRetrieveRequestType request=new SearchRetrieveRequestType();
            request.setVersion("1.1");
            request.setQuery("en and education");
            //request.setQuery("dc.title any sword");
            request.setRecordSchema("info:srw/schema/1/dc-v1.1");
            request.setStartRecord(new PositiveInteger("1"));
            request.setMaximumRecords(new NonNegativeInteger("1"));
            request.setRecordPacking("xml");
            SearchRetrieveResponseType response=
                port.searchRetrieveOperation(request);
            System.out.println("postings="+response.getNumberOfRecords());
View Full Code Here

Examples of org.apache.axis.types.PositiveInteger

        String name, value;
        StringBuilder extraData=new StringBuilder();
        while(enumer.hasMoreElements()) {
            name=(String)enumer.nextElement();
            if(name.equals("maximumTerms"))
                request.setMaximumTerms(new PositiveInteger(parser.getParameter(name)));
            else if(name.equals("operation"))
                {}
            else if(name.equals("responsePosition"))
                request.setResponsePosition(new NonNegativeInteger(parser.getParameter(name)));
            else if(name.equals("scanClause"))
View Full Code Here

Examples of org.apache.axis.types.PositiveInteger

            else if(name.equals("resultSetTTL"))
                request.setResultSetTTL(new NonNegativeInteger(parser.getParameter(name)));
            else if(name.equals("sortKeys"))
                request.setSortKeys(parser.getParameter(name));
            else if(name.equals("startRecord"))
                request.setStartRecord(new PositiveInteger(parser.getParameter(name)));
            else if(name.equals("version"))
                request.setVersion(parser.getParameter(name));
            else // must be extraData
                extraData.append('<').append(name).append('>')
                         .append(parser.getParameter(name))
View Full Code Here

Examples of org.apache.axis.types.PositiveInteger

                    if(sortKeys!=null && sortKeys.length()>0) {
                        System.out.print("&sortKeys="+sortKeys);
                        searchRequest.setSortKeys(sortKeys);
                    }
                    System.out.println("&startRecord="+startRecord+"\n");
                    searchRequest.setStartRecord(new PositiveInteger(Integer.toString(startRecord)));
                    startTime=System.currentTimeMillis();
                    searchResponse = db.doRequest(searchRequest);
                    System.out.println("elapsed time: "+(System.currentTimeMillis()-startTime)+"ms");
                    DiagnosticsType diags=searchResponse.getDiagnostics();
                    if(diags!=null) {
                        DiagnosticType diag, diagArray[]=diags.getDiagnostic();
                        for(i=0; i<diagArray.length; i++) {
                            diag=diagArray[i];
                            System.out.print("diagnostic: "+diag.getUri());
                            if(diag.getDetails()!=null)
                                System.out.print(", details: "+diag.getDetails());
                            System.out.println();
                        }
                    }
                    System.out.println("postings=" + searchResponse.getNumberOfRecords());
                   
//                    ExtraDataType edt=searchResponse.getExtraResponseData();
//                    if(edt!=null) {
//                        HandleSGML rh=new HandleSGML();
//                        StringBuffer tags=new StringBuffer();
//                        tags.append("ns1:restrictorSummary 0 recordTag\n");
//                        tags.append("restrictor             10\n");
//                        tags.append("entry                  11\n");
//                        tags.append("xmlns                  12\n");
//                        tags.append("xmlns:ns1              12\n");
//                        tags.append("count                  13\n");
//                        tags.append("use                    14\n");
//                        rh.loadTags(new StringReader(tags.toString()));
//                        rh.setByteToCharConverter("utf8");
//                        MessageElement elems[]=edt.get_any();
//                        rh.Input(new ByteArrayInputStream(elems[0].toString().getBytes("UTF-8")));
//                        DataDir summary=rh.getNextRecord();
//                        DataDir restrictors[]=new DataDir[summary.count()-1];
//                        restrictors[0]=summary.child().next();
//                        for(int i=1; i<restrictors.length; i++)
//                            restrictors[i]=restrictors[i-1].next();
//                        for(int i=0; i<restrictors.length; i++) {
//                            System.out.print("use="+restrictors[i].find(2).find(14).getUTFString());
//                            System.out.print(" count="+restrictors[i].find(2).find(13).getUTFString());
//                            System.out.print("     ");
//                        }
//                        System.out.println();
//                        for(int i=0; i<restrictors.length; i++)
//                            restrictors[i]=restrictors[i].child().next();
//                        for(int j=0; j<5; j++) {
//                            for(int i=0; i<restrictors.length; i++) {
//                                if(restrictors[i]!=null) {
//                                    System.out.print(restrictors[i].find(1).getUTFString());
//                                    System.out.print("("+restrictors[i].find(2).find(13).getUTFString()+")");
//                                    System.out.print("     ");
//                                    restrictors[i]=restrictors[i].next();
//                                }
//                                else
//                                    System.out.print("           ");
//                            }
//                            System.out.println();
//                        }
//                    }

                    RecordsType records = searchResponse.getRecords();
                    RecordType record[];
                    if(records == null || (record = records.getRecord()) == null) {
                        System.out.println("0 records returned");
                    }
                    else {
                        System.out.println(record.length + " records returned");
                        MessageElement[]    elems;
                        Source              source;
                        String              recordStr;
                        StringOrXmlFragment frag;
                        StringWriter        sw;
                        for(i=0; i<record.length; i++) {
                            System.out.print("record number " + record[i].getRecordPosition());
                            frag=record[i].getRecordData();
                            elems=frag.get_any();
                            recordStr=elems[0].toString();
                            if(transformer!=null) {
                                source=new StreamSource(new StringReader(recordStr));
                                sw=new StringWriter();
                                try {
                                    transformer.transform(source, new StreamResult(sw));
                                    System.out.print(sw.toString());
                                }
                                catch(Exception e) {
                                    e.printStackTrace();
                                }
                            }
                            else
                                System.out.println(recordStr);
                        }
                    }
                    System.out.println("nextRecordPosition=" + searchResponse.getNextRecordPosition());
                }
                else if(scan) {
                    System.out.print("operation=searchRetrieve");
                    scanRequest = new ScanRequestType();
                    System.out.print("&version=1.1");
                    scanRequest.setVersion("1.1");
                    System.out.println("&scanClause="+scanClause);
                    scanRequest.setScanClause(scanClause);
                    scanRequest.setMaximumTerms(new PositiveInteger(Integer.toString(maximumTerms)));
                    scanRequest.setResponsePosition(new NonNegativeInteger(Integer.toString(responsePosition)));
                    ScanResponseType scanResponse = db.doRequest(scanRequest);
                    if(scanResponse != null) {
                        TermsType terms = scanResponse.getTerms();
                        if(terms != null) {
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.