本文整理匯總了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;