Examples of DiagnosticsType


Examples of gov.loc.www.zing.srw.DiagnosticsType

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

Examples of gov.loc.www.zing.srw.DiagnosticsType

    }

    public ExplainResponseType diagnostic(final int code,
      final String details, final ExplainResponseType response) {
        boolean         addDiagnostics=false;
        DiagnosticsType diagnostics=response.getDiagnostics();
        if(diagnostics==null)
            addDiagnostics=true;
        diagnostics=newDiagnostic(code, details, diagnostics);
        if(addDiagnostics)
            response.setDiagnostics(diagnostics);
View Full Code Here

Examples of gov.loc.www.zing.srw.DiagnosticsType


    public ScanResponseType diagnostic(final int code,
      final String details, final ScanResponseType response) {
        boolean         addDiagnostics=false;
        DiagnosticsType diagnostics=response.getDiagnostics();
        if(diagnostics==null)
            addDiagnostics=true;
        diagnostics=newDiagnostic(code, details, diagnostics);
        if(addDiagnostics)
            response.setDiagnostics(diagnostics);
View Full Code Here

Examples of gov.loc.www.zing.srw.DiagnosticsType


    public SearchRetrieveResponseType diagnostic(final int code,
      final String details, final SearchRetrieveResponseType response) {
        boolean         addDiagnostics=false;
        DiagnosticsType diagnostics=response.getDiagnostics();
        if(diagnostics==null)
            addDiagnostics=true;
        diagnostics=newDiagnostic(code, details, diagnostics);
        if(addDiagnostics)
            response.setDiagnostics(diagnostics);
View Full Code Here

Examples of gov.loc.www.zing.srw.DiagnosticsType

        Vector<DiagnosticType> diagnostics = tl.getDiagnostics();
        if (diagnostics!=null && !diagnostics.isEmpty()) {
            DiagnosticType diagArray[] = new DiagnosticType[diagnostics.size()];
            diagnostics.toArray(diagArray);
            scanResponse.setDiagnostics(new DiagnosticsType(diagArray));
        }

        log.info("scan "+scanTerm+": (" + (System.currentTimeMillis() - startTime) + "ms)");
        return scanResponse;
    }
View Full Code Here

Examples of gov.loc.www.zing.srw.DiagnosticsType

        Vector<DiagnosticType> diagnostics = result.getDiagnostics();
        if (diagnostics!=null && !diagnostics.isEmpty()) {
            DiagnosticType diagArray[] = new DiagnosticType[diagnostics.size()];
            diagnostics.toArray(diagArray);
            response.setDiagnostics(new DiagnosticsType(diagArray));
        }
       
        if(!cachedResultSet)
            result.close();
View Full Code Here

Examples of gov.loc.www.zing.srw.DiagnosticsType

    }

    public static DiagnosticsType newDiagnostic(final int code,
      final String details, final DiagnosticsType diagnostics) {
        DiagnosticType  diags[];
        DiagnosticsType newDiagnostics=diagnostics;
        int numExistingDiagnostics=0;
        if(diagnostics!=null) {
            diags=diagnostics.getDiagnostic();
            numExistingDiagnostics=diags.length;
            DiagnosticType[] newDiags=
                new DiagnosticType[numExistingDiagnostics+1];
            System.arraycopy(diags, 0, newDiags, 0, numExistingDiagnostics);
            diags=newDiags;
            diagnostics.setDiagnostic(diags);
        }
        else {
            diags=new DiagnosticType[1];
            newDiagnostics=new DiagnosticsType();
            newDiagnostics.setDiagnostic(diags);
        }
        diags[numExistingDiagnostics]=SRWDiagnostic.newDiagnosticType(code, details);
        return newDiagnostics;
    }
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.