Package gov.loc.www.zing.srw.diagnostic

Examples of gov.loc.www.zing.srw.diagnostic.DiagnosticType


    }

    public boolean addDiagnostic(int code, String addInfo) {
        if(diagnostics==null)
            diagnostics=new Vector<DiagnosticType>();
        DiagnosticType dt=SRWDiagnostic.newDiagnosticType(code, addInfo);
        return diagnostics.add(dt);
    }
View Full Code Here


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

        terms.setTerm(tl.getTerms());
        scanResponse.setTerms(terms);

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

        if(extraResponseData!=null)
            setExtraResponseData(response, extraResponseData);

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

        }
    }

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

        return newDiagnosticType("info:srw/diagnostic/1/", code, details);
    }

    public static DiagnosticType newDiagnosticType(String baseURI, int code,
      String details) {
        DiagnosticType dt=new DiagnosticType();
        try {
            dt.setUri(new org.apache.axis.types.URI(baseURI+code));
        }
        catch(org.apache.axis.types.URI.MalformedURIException e) {
            log.error("error creating uri for code: "+code);
            log.error(e,e);
        }
        dt.setDetails(details);
        if(log.isDebugEnabled()) {
            try {
                log.debug(SRWDiagnostic.message[code]+"("+code+"): \""+details+
                    "\"");
            }
View Full Code Here

TOP

Related Classes of gov.loc.www.zing.srw.diagnostic.DiagnosticType

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.