本文整理汇总了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();
}
}
示例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;
}
示例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;
}
示例4: build
import edu.harvard.hul.ois.fits.exceptions.FitsException; //导入依赖的package包/类
@Override
public TechMetadata build()
throws FitsException {
return new TextMdMetadata(constructStandardSchemaXml());
}
示例5: build
import edu.harvard.hul.ois.fits.exceptions.FitsException; //导入依赖的package包/类
@Override
public TechMetadata build()
throws FitsException {
return new MixMetadata(constructStandardSchemaXml());
}
示例6: build
import edu.harvard.hul.ois.fits.exceptions.FitsException; //导入依赖的package包/类
@Override
public TechMetadata build()
throws FitsException {
return new VideoMdMetadata(constructStandardSchemaXml());
}
示例7: build
import edu.harvard.hul.ois.fits.exceptions.FitsException; //导入依赖的package包/类
@Override
public TechMetadata build()
throws FitsException {
return new AesMetadata(constructStandardSchemaXml());
}
示例8: build
import edu.harvard.hul.ois.fits.exceptions.FitsException; //导入依赖的package包/类
@Override
public TechMetadata build()
throws FitsException {
return new DocumentMdMetadata(constructStandardSchemaXml());
}
示例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();
}
示例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;