Пример #1
0
 private IResource ToResource(IEtpAdapter etpAdapter, Log log, LogCurveInfo curve)
 {
     return(etpAdapter.CreateResource(
                uuid: null,
                uri: curve.GetUri(log),
                resourceType: ResourceTypes.DataObject,
                name: curve.Mnemonic,
                lastChanged: log.GetLastChangedMicroseconds()));
 }
Пример #2
0
 private IResource ToResource(IEtpAdapter etpAdapter, Channel entity, EtpUri parentUri)
 {
     return(etpAdapter.CreateResource(
                uuid: entity.Uuid,
                uri: entity.GetUri(parentUri),
                resourceType: ResourceTypes.DataObject,
                name: $"{entity.Citation.Title} ({entity.Mnemonic})",
                lastChanged: entity.GetLastChangedMicroseconds()));
 }
Пример #3
0
 private IResource ToResource(IEtpAdapter etpAdapter, IWellboreObject entity)
 {
     return(etpAdapter.CreateResource(
                uuid: null,
                uri: entity.GetUri(),
                resourceType: ResourceTypes.DataObject,
                name: entity.Name,
                count: (entity as Log)?.LogCurveInfo?.Count ?? 0,
                lastChanged: (entity as ICommonDataObject).GetLastChangedMicroseconds()));
 }
Пример #4
0
 private IResource ToResource(IEtpAdapter etpAdapter, Wellbore entity)
 {
     return(etpAdapter.CreateResource(
                uuid: null,
                uri: entity.GetUri(),
                resourceType: ResourceTypes.DataObject,
                name: entity.Name,
                count: GetWellboreDataAdapters().Count(),
                lastChanged: entity.GetLastChangedMicroseconds()));
 }
Пример #5
0
 private IResource ToResource(IEtpAdapter etpAdapter, AbstractObject entity, EtpUri parentUri, int hasChildren = -1)
 {
     return(etpAdapter.CreateResource(
                uuid: entity.Uuid,
                uri: entity.GetUri(parentUri),
                resourceType: ResourceTypes.DataObject,
                name: entity.Citation.Title,
                count: hasChildren,
                lastChanged: entity.GetLastChangedMicroseconds()));
 }
Пример #6
0
        private IResource ToResource(IEtpAdapter etpAdapter, AbstractObject entity, EtpUri parentUri, int hasChildren = -1)
        {
            var name    = entity.Citation.Title;
            var channel = entity as Channel;

            if (channel != null)
            {
                name = $"{name} ({channel.Mnemonic})";
            }

            return(etpAdapter.CreateResource(
                       uuid: entity.Uuid,
                       uri: entity.GetUri(parentUri),
                       resourceType: ResourceTypes.DataObject,
                       name: name,
                       count: hasChildren,
                       lastChanged: entity.GetLastChangedMicroseconds()));
        }