Exemple #1
0
        /////////////////////////////////////////////////

        public Indexable GetIndexable(NautilusTools.NautilusMetadata nm)
        {
            Indexable indexable = new Indexable(nm.Uri);

            indexable.Type = IndexableType.PropertyChange;

            Property prop;

            // Reset the notes property.
            if (nm.Notes == null)
            {
                nm.Notes = String.Empty;
            }

            prop              = Property.New("nautilus:notes", nm.Notes);
            prop.IsMutable    = true;
            prop.IsPersistent = true;
            indexable.AddProperty(prop);

            foreach (string emblem in nm.Emblems)
            {
                prop              = Property.NewKeyword("nautilus:emblem", emblem);
                prop.IsMutable    = true;
                prop.IsPersistent = true;
                indexable.AddProperty(prop);
            }

            // We add an empty keyword so that the property is reset
            if (nm.Emblems.Count == 0)
            {
                prop              = Property.NewKeyword("nautilus:emblem", String.Empty);
                prop.IsMutable    = true;
                prop.IsPersistent = true;
                indexable.AddProperty(prop);
            }

            return(indexable);
        }
Exemple #2
0
        public Indexable GetNextIndexable()
        {
            NautilusTools.NautilusMetadata nm = (NautilusTools.NautilusMetadata)metadata.Current;

            return(GetIndexable(nm));
        }