Inheritance: Ecologylab.BigSemantics.MetadataNS.Builtins.Declarations.DocumentDeclaration
Ejemplo n.º 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;
        }
Ejemplo n.º 2
0
        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
     }
 }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
 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;
 }