示例#1
0
//        public ParsedUri DownloadLocation
//        {
//            get
//            {
//                ParsedUri result	    = Location.Value;
//		        ParsedUri localLocation	= LocalLocation.Value;
//		        if (localLocation != null)
//		        {
//			        FileInfo localFile	= localLocation.File;
//			        if (localFile.Exists)
//				        result	= localLocation;
//		        }
//		        return result;
//            }
//        }

        ///<summary>
        /// @return A closure for this, or null, if this is not fit to be parsed.
        ///</summary>
        public DocumentClosure GetOrConstructClosure(MetadataServicesClient client, SemanticsGlobalCollection <Document> downloadedDocumentCollection)
        {
            DocumentClosure result = this.documentClosure;

            if (result == null)
            {
                result = this.documentClosure;
                if (result == null)
                {
                    result = ConstructClosure(client, downloadedDocumentCollection);
                    this.documentClosure = result;
                }
            }
            return(result);
        }
示例#2
0
        ///<summary>
        /// @return A closure for this, or null, if this is not fit to be parsed.
        ///</summary>
        public DocumentClosure GetOrConstructClosure()
        {
            DocumentClosure result = this.documentClosure;

            if (result == null /*&& !isRecycled() && getLocation() != null*/)
            {
                result = this.documentClosure;
                if (result == null)
                {
                    //					if (semanticInlinks == null)
                    //						semanticInlinks	= new SemanticInLinks();

                    result = ConstructClosure();
                    this.documentClosure = result;
                }
            }
            return(result == null /* || result.downloadStatus == DownloadStatus.RECYCLED*/ ? null : result);
        }
示例#3
0
 public DocumentClosureEventArgs(DocumentClosure documentClosure, Exception exception) :
     this(documentClosure)
 {
     this.exception = exception;
 }
示例#4
0
 public DocumentClosureEventArgs(DocumentClosure documentClosure)
 {
     this.documentClosure = documentClosure;
 }
示例#5
0
 public DocumentClosureConnectionHelper(SemanticsSessionScope semanticsSessionScope, Document originalDocument, DocumentClosure documentClosure)
 {
     this.semanticsSessionScope = semanticsSessionScope;
     this.originalDocument      = originalDocument;
     this.documentClosure       = documentClosure;
 }
 public DocumentClosureEventArgs(DocumentClosure documentClosure, Exception exception) :
     this(documentClosure)
 {
     this.exception = exception;
 }
 public DocumentClosureEventArgs(DocumentClosure documentClosure)
 {
     this.documentClosure = documentClosure;
 }
 public DocumentClosureConnectionHelper(SemanticsSessionScope semanticsSessionScope, Document originalDocument, DocumentClosure documentClosure)
 {
     this.semanticsSessionScope = semanticsSessionScope;
     this.originalDocument = originalDocument;
     this.documentClosure = documentClosure;
 }
示例#9
0
        ///<summary> 
        /// @return A closure for this, or null, if this is not fit to be parsed.
        ///</summary>
        public DocumentClosure GetOrConstructClosure()
        {
            DocumentClosure result = this.documentClosure;
            if (result == null /*&& !isRecycled() && getLocation() != null*/)
            {
                result = this.documentClosure;
                if (result == null)
                {
                    //					if (semanticInlinks == null)
                    //						semanticInlinks	= new SemanticInLinks();

                    result = ConstructClosure();
                    this.documentClosure = result;
                }
            }
            return result == null/* || result.downloadStatus == DownloadStatus.RECYCLED*/ ? null : result;
        }
示例#10
0
        //        public ParsedUri DownloadLocation
        //        {
        //            get
        //            {
        //                ParsedUri result	    = Location.Value;
        //                ParsedUri localLocation	= LocalLocation.Value;
        //                if (localLocation != null)
        //                {
        //                    FileInfo localFile	= localLocation.File;
        //                    if (localFile.Exists)
        //                        result	= localLocation;
        //                }
        //                return result;
        //            }
        //        }
        ///<summary> 
        /// @return A closure for this, or null, if this is not fit to be parsed.
        ///</summary>
        public DocumentClosure GetOrConstructClosure(MetadataServicesClient client, SemanticsGlobalCollection<Document> downloadedDocumentCollection)
        {
            DocumentClosure result	= this.documentClosure;
            if (result == null)
            {
                result	= this.documentClosure;
                if (result == null)
                {

                    result = ConstructClosure(client, downloadedDocumentCollection);
                    this.documentClosure = result;
                }
            }
            return result;
        }
 public void FillValues(SemanticsSessionScope semanticsSessionScope, PURLConnection purlConnection, MetaMetadataCompositeField metaMetadata, DocumentClosure documentClosure)
 {
     SemanticsSessionScope = semanticsSessionScope;
     PURLConnection = purlConnection;
     MetaMetadata = metaMetadata;
     DocumentClosure = documentClosure;
 }
 /// <summary>
 /// Passes the DocumentClosure through to the RunDownloadLoop.
 /// Once the resulting extraction is completed, the call site is notified through the await mechanism.
 /// </summary>
 /// <param name="documentClosure"> </param>
 /// <returns></returns>
 public void QueueExtractionRequest(DocumentClosure documentClosure)
 {
     _toDownload.TryAdd(documentClosure);
 }