Пример #1
0
        private async Task <ICollection <ArchivalObject> > GetArchivalObjectChildrenActionAsync(int id)
        {
            var uriSegment = String.Format("/archival_objects/{0}/children", id);
            var archivalObjectCollectionString = await ArchivesSpaceService.GetApiDataAsync(uriSegment);

            var archivalObjectCollection = JsonConvert.DeserializeObject <List <ArchivalObject> >(archivalObjectCollectionString, new JsonAspaceNoteConverter(), new JsonAspaceNoteItemConverter());

            return(archivalObjectCollection);
        }
Пример #2
0
        private async Task <ArchivalObject> GetArchivalObjectByIdActionAsync(int id)
        {
            var uriSegment           = String.Format("/archival_objects/{0}", id);
            var archivalObjectString = await ArchivesSpaceService.GetApiDataAsync(uriSegment);

            var archivalObject = JsonConvert.DeserializeObject <ArchivalObject>(archivalObjectString, new JsonAspaceNoteConverter(), new JsonAspaceNoteItemConverter());

            return(archivalObject);
        }
Пример #3
0
        public virtual async Task <ContainerProfile> GetContainerProfileByIdActionAsync(int id)
        {
            var uriSegment = String.Format("/container_profiles/{0}", id);
            var locString  = await ArchivesSpaceService.GetApiDataNoRepositoryAsync(uriSegment);

            var loc = JsonConvert.DeserializeObject <ContainerProfile>(locString);

            return(loc);
        }
Пример #4
0
        public async Task <List <int> > GetAllAccessionIdsAsync()
        {
            var uriSegment          = "/accessions?all_ids=true";
            var allAccessionsString = await ArchivesSpaceService.GetApiDataAsync(uriSegment);

            var allAccessions = JsonConvert.DeserializeObject <List <int> >(allAccessionsString);

            return(allAccessions);
        }
Пример #5
0
        public virtual async Task <Resource> GetResourceByIdAsync(int id)
        {
            var uriSegment     = String.Format("/resources/{0}", id);
            var resourceString = await ArchivesSpaceService.GetApiDataAsync(uriSegment);

            var resource = JsonConvert.DeserializeObject <Resource>(resourceString, new JsonAspaceNoteConverter(), new JsonAspaceNoteItemConverter());

            return(resource);
        }
Пример #6
0
        public virtual async Task <List <int> > GetAllResourceIdsAsync()
        {
            var uriSegment         = "/resources?all_ids=true";
            var allResourcesString = await ArchivesSpaceService.GetApiDataAsync(uriSegment);

            var allResources = JsonConvert.DeserializeObject <List <int> >(allResourcesString);

            return(allResources);
        }
        private async Task <List <int> > GetAllTopContainerIdsActionAsync()
        {
            var uriSegment   = "/top_containers?all_ids=true";
            var allTcsString = await ArchivesSpaceService.GetApiDataAsync(uriSegment);

            var alTcs = JsonConvert.DeserializeObject <List <int> >(allTcsString);

            return(alTcs);
        }
Пример #8
0
        private async Task <SmallTree> GetSmallResourceTreeActionAsync(int resourceId)
        {
            var uriSegment       = String.Format("/resources/{0}/small_tree", resourceId);
            var recordTreeString = await ArchivesSpaceService.GetApiDataAsync(uriSegment);

            var recordTree = JsonConvert.DeserializeObject <SmallTree>(recordTreeString);

            return(recordTree);
        }
        private async Task <TopContainer> GetTopContainerByIdActionAsync(int id)
        {
            var uriSegment = String.Format("/top_containers/{0}", id);
            var tcString   = await ArchivesSpaceService.GetApiDataAsync(uriSegment);

            var tc = JsonConvert.DeserializeObject <TopContainer>(tcString, new JsonAspaceNoteConverter(), new JsonAspaceNoteItemConverter());

            return(tc);
        }
Пример #10
0
        public virtual async Task <List <int> > GetAllContainerProfileIdsActionAsync()
        {
            var uriSegment   = "/container_profiles?all_ids=true";
            var allCpsString = await ArchivesSpaceService.GetApiDataNoRepositoryAsync(uriSegment);

            var alCps = JsonConvert.DeserializeObject <List <int> >(allCpsString);

            return(alCps);
        }
Пример #11
0
        public async Task <Accession> GetAccessionByIdAsync(int id)
        {
            var uriSegment      = String.Format("/accessions/{0}", id);
            var accessionString = await ArchivesSpaceService.GetApiDataAsync(uriSegment);

            var accession = JsonConvert.DeserializeObject <Accession>(accessionString);

            return(accession);
        }
        private async Task <Location> GetLocationByIdActionAsync(int id)
        {
            var uriSegment = String.Format("/locations/{0}", id);
            var locString  = await ArchivesSpaceService.GetApiDataNoRepositoryAsync(uriSegment);

            var loc = JsonConvert.DeserializeObject <Location>(locString, new JsonAspaceNoteConverter(), new JsonAspaceNoteItemConverter());

            return(loc);
        }
        private async Task <List <int> > GetAllLocationIdsActionAsync()
        {
            var uriSegment   = "/locations?all_ids=true";
            var allTcsString = await ArchivesSpaceService.GetApiDataNoRepositoryAsync(uriSegment);

            var alTcs = JsonConvert.DeserializeObject <List <int> >(allTcsString);

            return(alTcs);
        }
Пример #14
0
        private async Task <RecordTreeResource> GetRecordTreeActionAsync(int resourceId, bool firstLevelOnly)
        {
            var limitParameter   = firstLevelOnly ? "?limit_to=root" : "";
            var uriSegment       = String.Format("/resources/{0}/tree{1}", resourceId, limitParameter);
            var recordTreeString = await ArchivesSpaceService.GetApiDataAsync(uriSegment);

            var recordTree = JsonConvert.DeserializeObject <RecordTreeResource>(recordTreeString);

            return(recordTree);
        }
Пример #15
0
 public ArchivesSpaceContainerProfileManager(ArchivesSpaceService activeService)
     : base(activeService)
 {
 }
Пример #16
0
 public ArchivesSpaceResourceManager(ArchivesSpaceService activeService)
     : base(activeService)
 {
     //This sets the ArchivesSpaceService field in the base class
 }
 public ArchivesSpaceTopContainerManager(ArchivesSpaceService activeService)
     : base(activeService)
 {
     //This sets the ArchivesSpaceService field in the base class
 }
Пример #18
0
 public ArchivesSpaceAccessionManager(ArchivesSpaceService activeService) : base(activeService)
 {
     //This sets the ArchivesSpaceService field in the base class
 }
Пример #19
0
 public ArchivesSpaceSearch(ArchivesSpaceService activeService)
 {
     ArchivesSpaceService = activeService;
 }
 public ArchivesSpaceLocationManager(ArchivesSpaceService activeService)
     : base(activeService)
 {
 }