Пример #1
0
        public void Select(SemWeb.StatementSink sink)
        {
            Entity keywords = null;

            foreach (DataSet data in sets)
            {
                switch (data.ID)
                {
                case DataSetID.CopyrightNotice:
                    MetadataStore.AddLiteral(sink, "dc:rights", "rdf:Alt", new Literal(data.XmpObject, "x-default", null));
                    break;

                case DataSetID.ByLine:
                    MetadataStore.AddLiteral(sink, "dc:creator", "rdf:Seq", new Literal(data.XmpObject, "x-default", null));
                    break;

                case DataSetID.CaptionAbstract:
                    MetadataStore.AddLiteral(sink, "dc:description", "rdf:Alt", new Literal(data.XmpObject, "x-default", null));
                    break;

                case DataSetID.ObjectName:
                    MetadataStore.AddLiteral(sink, "dc:title", "rdf:Alt", new Literal(data.XmpObject, "x-default", null));
                    break;

                case DataSetID.Keywords:
                    if (keywords == null)
                    {
                        keywords = new BNode();
                        sink.Add(new Statement(MetadataStore.FSpotXMPBase,
                                               MetadataStore.Namespaces.Resolve("dc:subject"),
                                               keywords));
                        sink.Add(new Statement(keywords,
                                               (Entity)MetadataStore.Namespaces.Resolve("rdf:type"),
                                               (Entity)MetadataStore.Namespaces.Resolve("rdf:Bag")));
                    }
                    sink.Add(new Statement(keywords,
                                           MetadataStore.Namespaces.Resolve("rdf:li"),
                                           new Literal(data.XmpObject, "x-default", null)));
                    break;

                default:
                    if (data.XmpPredicate != null)
                    {
                        sink.Add(new Statement(MetadataStore.FSpotXMPBase,
                                               (Entity)data.XmpPredicate,
                                               new Literal(data.XmpObject)));
                    }
                    break;
                }
            }
        }
Пример #2
0
 public void Select(SemWeb.StatementSink sink)
 {
     store.Select(sink);
 }