Inheritance: Ecologylab.BigSemantics.MetadataNS.Builtins.Declarations.DocumentDeclaration
Beispiel #1
0
        public ImageClipping ConstructClipping(Document sourceDocument, Document outlink, String caption, String context)
        {
            var result	= new ImageClipping(SemanticsSessionScope.Get.ImageClippingMetaMetadata, this, sourceDocument, outlink, caption, context);
            this.AddClipping(result);

            return result;
        }
        public static ImageClipping ConstructClipping(ParsedUri location, Document sourceDoc, IdeaMacheUser creator)
        {
            var imageClipping = new ImageClipping
            {
                Media = new Image
                {
                    Location = new MetadataParsedURL(location)
                },
                SourceDoc = sourceDoc,
                CreativeActs = new List<CreativeAct>(),

            };
            imageClipping.CreativeActs.Add(new CreativeAct
            {
                Action = CreativeAct.CreativeAction.CurateClipping,
                Time = new MetadataDate(DateTime.UtcNow),
                Creator = creator
            });

            return imageClipping;
        }
 internal DocumentClosure(SemanticsSessionScope semanticsSessionScope, Document document)
 {
     SemanticsSessionScope = semanticsSessionScope;
     Document = document;
 }
 public DocumentClosureConnectionHelper(SemanticsSessionScope semanticsSessionScope, Document originalDocument, DocumentClosure documentClosure)
 {
     this.semanticsSessionScope = semanticsSessionScope;
     this.originalDocument = originalDocument;
     this.documentClosure = documentClosure;
 }
 public void ChangeDocument(Document newDocument)
 {
     lock (documentLock)
     {
         Document oldDocument = Document;
         Document = newDocument;
         newDocument.InheritValues(oldDocument);
         // do we need to assign semanticsInLinks here?
         // TODO recycle oldDocument
     }
 }
        public void InheritValues(Document oldDocument)
        {
            oldDocument.SemanticsSessionScope.GlobalDocumentCollection.Remap(oldDocument, this);

            if (Location == null)
            {
                Location = oldDocument.Location;
                oldDocument.Location = null;
            }

            this.SemanticsSessionScope = oldDocument.SemanticsSessionScope;

            // TODO semantic inlinks

            List<Metadata> oldMixins = oldDocument.Mixins;
            if (oldMixins != null)
                foreach (Metadata oldMixin in oldMixins)
                    AddMixin(oldMixin);

            List<MetadataParsedURL> oldAdditionalLocations = oldDocument.AdditionalLocations;
            if (oldAdditionalLocations != null)
                foreach (MetadataParsedURL otherLocation in oldAdditionalLocations)
                    AddAdditionalLocation(otherLocation);
        }
 public ImageClipping(MetaMetadataCompositeField metaMetadata, Image clippedMedia, Document source, Document outlink, String caption, String context)
     : this(metaMetadata)
 {
     InitMediaClipping(this, clippedMedia, source, outlink, caption, context);
 }
 public MetadataResponse(Document metadata)
 {
     this.metadata = metadata;
 }