コード例 #1
0
 /**
  * Look-up MetaMetadata for this purl. If there is no special MetaMetadata, use Image. Construct
  * Metadata of the correct subtype, base on the MetaMetadata.
  *
  * @param purl
  * @return A Metadata object, either of type Image, or a subclass. Never null!
  */
 public Media constructImage(ParsedURL purl) {
   MetaMetadata metaMetadata = getImageMM(purl);
   Media result = null;
   if (metaMetadata != null) {
     result = (Media) metaMetadata.constructMetadata(metadataTScope);
   }
   return result;
 }
コード例 #2
0
 /**
  * Look-up MetaMetadata for this purl. If there is no special MetaMetadata, use Document.
  * Construct Metadata of the correct subtype, base on the MetaMetadata. Set its location field to
  * purl.
  *
  * @param purl
  * @return
  */
 public Document constructDocument(ParsedURL purl) {
   MetaMetadata metaMetadata = getDocumentMM(purl);
   Document result = (Document) metaMetadata.constructMetadata(metadataTScope);
   result.setLocation(purl);
   return result;
 }