Esempio n. 1
0
 public SearchResultItem(object doc)
 {
     DistributionDetails = new DistributionDetails();
     if (doc is MetadataIndexDoc)
     {
         MetadataIndexDoc metadataIndexDoc = (MetadataIndexDoc)doc;
         DatasetName = metadataIndexDoc.ResourceReferenceCodeName;
         SetSearchIndexDoc(metadataIndexDoc);
     }
     else if (doc is MetadataIndexAllDoc)
     {
         MetadataIndexAllDoc metadataIndexAllDoc = (MetadataIndexAllDoc)doc;
         SetSearchIndexDoc(metadataIndexAllDoc);
         DistributionDetails.Name     = metadataIndexAllDoc.DistributionName;
         DistributionDetails.Protocol = metadataIndexAllDoc.DistributionProtocol;
         DistributionDetails.URL      = metadataIndexAllDoc.DistributionUrl;
     }
     else if (doc is ServiceIndexDoc)
     {
         ServiceIndexDoc serviceIndexDoc = (ServiceIndexDoc)doc;
         SetSearchIndexDoc(serviceIndexDoc);
         DistributionDetails.Name     = serviceIndexDoc.DistributionName;
         DistributionDetails.Protocol = serviceIndexDoc.DistributionProtocol;
         DistributionDetails.URL      = serviceIndexDoc.DistributionUrl;
     }
     if (doc is ApplicationIndexDoc)
     {
         ApplicationIndexDoc applicationIndexDoc = (ApplicationIndexDoc)doc;
         SetSearchIndexDoc(applicationIndexDoc);
     }
 }
Esempio n. 2
0
 public SearchResultItem()
 {
     DistributionDetails = new DistributionDetails();
 }