當前位置: 首頁>>代碼示例>>Java>>正文


Java FitsException類代碼示例

本文整理匯總了Java中edu.harvard.hul.ois.fits.exceptions.FitsException的典型用法代碼示例。如果您正苦於以下問題:Java FitsException類的具體用法?Java FitsException怎麽用?Java FitsException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FitsException類屬於edu.harvard.hul.ois.fits.exceptions包,在下文中一共展示了FitsException類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: examineFile

import edu.harvard.hul.ois.fits.exceptions.FitsException; //導入依賴的package包/類
void examineFile(File file) throws FitsException, IOException, SolrServerException, XMLStreamException {
    System.out.println("Adding " + file.getName());
    FitsOutput fitsOutput = fits.examine(file);
    fitsOutput.addStandardCombinedFormat();

    SolrInputDocument solrDoc = new SolrInputDocument();

    this.indexFitsFileInfo(fitsOutput, solrDoc);
    this.indexFitsIdentities(fitsOutput, solrDoc);
    this.indexTechMetadata(fitsOutput, solrDoc);

    Document fitsXml = fitsOutput.getFitsXml();
    this.indexFitsXml(fitsXml, solrDoc);

    try {
        UpdateResponse response = solr.add(solrDoc);
        solr.commit();
    } catch (HttpSolrClient.RemoteSolrException e) {
        e.printStackTrace();
    }

}
 
開發者ID:little9,項目名稱:SolrFits,代碼行數:23,代碼來源:FitsExaminer.java

示例2: build

import edu.harvard.hul.ois.fits.exceptions.FitsException; //導入依賴的package包/類
/**
 * Creates an object <code>ExtractedMetadata</code> based upon output returned by FITS.
 * 
 * @return extracted metadata object
 * @throws FitsException
 *             when construction of an extracted metadata object failed
 */
public ExtractedMetadata build()
        throws FitsException {
    ExtractedMetadata extractedMetadata = new ExtractedMetadata();
    extractedMetadata.setFileFormat(new FileFormatBuilder(fitsOutput).build());
    extractedMetadata.setFileStatus(new FileStatusBuilder(fitsOutput).build());
    extractedMetadata.setTechMetadata(new TechMetadataDirector(fitsOutput).construct());
    extractedMetadata.setAdditionalMetadata(new AdditionalExtractedMetadataBuilder(fitsOutput).build());
    return extractedMetadata;
}
 
開發者ID:psnc-dl,項目名稱:darceo,代碼行數:17,代碼來源:ExtractedMetadataBuilder.java

示例3: construct

import edu.harvard.hul.ois.fits.exceptions.FitsException; //導入依賴的package包/類
/**
 * Constructs a proper technical metadata object.
 * 
 * @return technical metadata object
 * @throws FitsException
 *             when construction of a XML with technical metadata failed
 */
public List<TechMetadata> construct()
        throws FitsException {
    Map<String, XmlContent> xmlContents = fitsOutput.getStandardXmlContents();
    if (xmlContents.size() == 0) {
        return null;
    }
    List<TechMetadata> result = new ArrayList<TechMetadata>();
    FileType fileType = new FileTypeBuilder(fitsOutput).build();
    switch (fileType) {
        case TEXT:
            result.add(new TextMdMetadataBuilder(xmlContents.get("text")).build());
            break;
        case DOCUMENT:
            result.add(new DocumentMdMetadataBuilder(xmlContents.get("document")).build());
            break;
        case IMAGE:
            result.add(new MixMetadataBuilder(xmlContents.get("image")).build());
            break;
        case AUDIO:
            result.add(new AesMetadataBuilder(xmlContents.get("audio")).build());
            break;
        case VIDEO:
            result.add(new VideoMdMetadataBuilder(xmlContents.get("video")).build());
            if (xmlContents.size() > 1) {
                result.add(new AesMetadataBuilder(xmlContents.get("audio")).build());
            }
            break;
        default:
            return null;
    }
    return result;
}
 
開發者ID:psnc-dl,項目名稱:darceo,代碼行數:40,代碼來源:TechMetadataDirector.java

示例4: build

import edu.harvard.hul.ois.fits.exceptions.FitsException; //導入依賴的package包/類
@Override
public TechMetadata build()
        throws FitsException {
    return new TextMdMetadata(constructStandardSchemaXml());
}
 
開發者ID:psnc-dl,項目名稱:darceo,代碼行數:6,代碼來源:TextMdMetadataBuilder.java

示例5: build

import edu.harvard.hul.ois.fits.exceptions.FitsException; //導入依賴的package包/類
@Override
public TechMetadata build()
        throws FitsException {
    return new MixMetadata(constructStandardSchemaXml());
}
 
開發者ID:psnc-dl,項目名稱:darceo,代碼行數:6,代碼來源:MixMetadataBuilder.java

示例6: build

import edu.harvard.hul.ois.fits.exceptions.FitsException; //導入依賴的package包/類
@Override
public TechMetadata build()
        throws FitsException {
    return new VideoMdMetadata(constructStandardSchemaXml());
}
 
開發者ID:psnc-dl,項目名稱:darceo,代碼行數:6,代碼來源:VideoMdMetadataBuilder.java

示例7: build

import edu.harvard.hul.ois.fits.exceptions.FitsException; //導入依賴的package包/類
@Override
public TechMetadata build()
        throws FitsException {
    return new AesMetadata(constructStandardSchemaXml());
}
 
開發者ID:psnc-dl,項目名稱:darceo,代碼行數:6,代碼來源:AesMetadataBuilder.java

示例8: build

import edu.harvard.hul.ois.fits.exceptions.FitsException; //導入依賴的package包/類
@Override
public TechMetadata build()
        throws FitsException {
    return new DocumentMdMetadata(constructStandardSchemaXml());
}
 
開發者ID:psnc-dl,項目名稱:darceo,代碼行數:6,代碼來源:DocumentMdMetadataBuilder.java

示例9: FitsTechMetadataExtractorService

import edu.harvard.hul.ois.fits.exceptions.FitsException; //導入依賴的package包/類
/**
 * Constructs this technical metadata extractor.
 * 
 * @throws FitsException
 *             when FITS instance could not be created
 */
public FitsTechMetadataExtractorService()
        throws FitsException {
    //fits = new Fits();
}
 
開發者ID:psnc-dl,項目名稱:darceo,代碼行數:11,代碼來源:FitsTechMetadataExtractorService.java

示例10: build

import edu.harvard.hul.ois.fits.exceptions.FitsException; //導入依賴的package包/類
/**
 * Builds <code>TechMetadata</code> object based upon data returned by FITS.
 * 
 * @return technical matadata object.
 * @throws FitsException
 *             when construction of a XML failed
 */
public abstract TechMetadata build()
        throws FitsException;
 
開發者ID:psnc-dl,項目名稱:darceo,代碼行數:10,代碼來源:TechMetadataBuilder.java


注:本文中的edu.harvard.hul.ois.fits.exceptions.FitsException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。