Пример #1
0
        override protected void ExtractMetaData(Gsf.Input sumStream, Gsf.Input docSumStream)
        {
            int     count = 0;
            DocProp prop  = null;

            if (sumMeta != null)
            {
                prop = sumMeta.Lookup("gsf:word-count");
                if (prop != null)
                {
                    count = (int)prop.Val;
                }
                if (count > 0)
                {
                    AddProperty(Beagle.Property.NewUnsearched("fixme:word-count", count));
                }

                count = 0;
                prop  = sumMeta.Lookup("gsf:page-count");
                if (prop != null)
                {
                    count = (int)prop.Val;
                }
                if (count > 0)
                {
                    AddProperty(Beagle.Property.NewUnsearched("fixme:page-count", count));
                }
            }
        }
Пример #2
0
        void PullMetaData(Gsf.Input sum_stream, Gsf.Input doc_stream)
        {
            DocProp prop = null;

            sumMeta = new DocMetaData();
            if (sum_stream != null)
            {
                Msole.MetadataRead(sum_stream, sumMeta);
            }
            else
            {
                Logger.Log.Warn("SummaryInformationStream not found in {0}", FileName);
            }

            docSumMeta = new DocMetaData();
            if (doc_stream != null)
            {
                Msole.MetadataRead(doc_stream, docSumMeta);
            }
            else
            {
                Logger.Log.Warn("DocumentSummaryInformationStream not found in {0}", FileName);
            }

            if (sumMeta != null)
            {
                prop = sumMeta.Lookup("dc:title");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("dc:title", prop.Val as string));
                }

                prop = sumMeta.Lookup("dc:subject");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("dc:subject", prop.Val as string));
                }

                prop = sumMeta.Lookup("dc:description");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("dc:description", prop.Val as string));
                }

                prop = sumMeta.Lookup("gsf:keywords");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("fixme:keywords", prop.Val as string));
                }

                prop = sumMeta.Lookup("gsf:creator");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("fixme:author", prop.Val as string));
                }

                prop = sumMeta.Lookup("gsf:last-saved-by");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("fixme:last-saved-by", prop.Val as string));
                }

                prop = sumMeta.Lookup("gsf:generator");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("fixme:generator", prop.Val as string));
                }

                prop = sumMeta.Lookup("gsf:template");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("fixme:template", prop.Val as string));
                }
            }

            if (docSumMeta != null)
            {
                prop = docSumMeta.Lookup("gsf:company");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("fixme:company", prop.Val as string));
                }

                prop = docSumMeta.Lookup("gsf:category");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("fixme:category", prop.Val as string));
                }

                prop = docSumMeta.Lookup("CreativeCommons_LicenseURL");
                if (prop != null)
                {
                    AddProperty(Beagle.Property.New("fixme:license", prop.Val as string));
                }
            }

            ExtractMetaData(sum_stream, doc_stream);

            if (sumMeta != null)
            {
                sumMeta.Dispose();
            }

            if (docSumMeta != null)
            {
                docSumMeta.Dispose();
            }
        }
Пример #3
0
 protected virtual void ExtractMetaData(Gsf.Input sum_stream,
                                        Gsf.Input doc_stream)
 {
 }