当前位置: 首页>>代码示例>>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;未经允许,请勿转载。