diff --git a/.gitignore b/.gitignore index c683eb1..7edaead 100644 --- a/.gitignore +++ b/.gitignore @@ -121,3 +121,13 @@ Assets/StreamingAssets/crashlytics-build.properties # Temp file *~ .idea/.idea.UnityInterface + +# Exclude the Generated Stuff +!Generated/ +!Assets/CineastUnityInterface/Runtime/Libs/ + +# Ignore auto-downloaded nuget +**/nuget.exe + +# OS specific +.DS_Store diff --git a/Assets/CineastUnityInterface/Documentation/Vitrivr.UnityInterface.CineastApi.md b/Assets/CineastUnityInterface/Documentation/Vitrivr.UnityInterface.CineastApi.md deleted file mode 100644 index 8a9f144..0000000 --- a/Assets/CineastUnityInterface/Documentation/Vitrivr.UnityInterface.CineastApi.md +++ /dev/null @@ -1,7 +0,0 @@ -# Cineast Unity Interface - -Documentation of the Cineast Unity Interface. - -## Usage - -Attach the `CineastApi` MonoBehaviour to a game object of choice to be able to use the API. \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Editor/.gitkeep b/Assets/CineastUnityInterface/Editor/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Assets/CineastUnityInterface/README.md b/Assets/CineastUnityInterface/README.md deleted file mode 100644 index aeaef65..0000000 --- a/Assets/CineastUnityInterface/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Cineast Unity Interface Package - -Small work-in-progress unity package providing a client for [Cineast](https://github.com/vitrivr/cineast/) - -At its heart, this is a simple client for Cineast's REST endpoint. \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime.meta b/Assets/CineastUnityInterface/Runtime.meta deleted file mode 100644 index fae4f9d..0000000 --- a/Assets/CineastUnityInterface/Runtime.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 1b30421077a946bfb5a6b41b459b6d41 -timeCreated: 1565163222 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr.meta deleted file mode 100644 index 9e8de7d..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: b600b578d33b43c2b9770e3848a46228 -timeCreated: 1565163222 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface.meta deleted file mode 100644 index 87f2e95..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 194b9dea711c49d685d7caab9b7eb057 -timeCreated: 1565163222 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi.meta deleted file mode 100644 index 3181f19..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 45914c57d5214e1f9d11c984ab30dc93 -timeCreated: 1565163222 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/CineastApi.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/CineastApi.cs deleted file mode 100644 index f9b6e3b..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/CineastApi.cs +++ /dev/null @@ -1,381 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Query; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Processing; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Utils; -using UnityEngine; -//using Logger = Assets.Modules.SimpleLogging.Logger; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi { - public class CineastApi : MonoBehaviour { - private bool earlyBreak; - - private FilterEngine filterEngine; - - private bool finished; - - private Logger logger; - - private WWW metaRequest; - private MetaDataResult metaResult; - private List objectList; - - private WWW objectRequest; - private ObjectsResult objectsResult; - - private Action> queryFinishedCallback; - - private List results; - - private WWW segmentRequest; - private SegmentResult segmentResult; - private WWW similarRequest; - private SimilarResult similarResult; - - private IDictionary>> _guidHandlerMap; - - private void Awake() { - filterEngine = new FilterEngine(); - if (CineastConfiguration.HasConfig()) { - CineastConfiguration config = CineastConfiguration.Load(); - if (!config.IsEmpty()) { - CineastUtils.Configuration = config; - } else { - CineastUtils.Configuration = CineastConfiguration.GetDefault(); - } - } else { - CineastConfiguration.StoreEmpty(); - } - _guidHandlerMap = new Dictionary>>(); - } - - /// - /// Performs an asynchronous request based on the similarity query provided. - /// - /// The query to query cineast - /// The handler for handling success / failure - public void RequestAsync(SimilarQuery query, CineastResponseHandler> handler) { - Guid guid = new Guid(); - _guidHandlerMap.Add(guid.ToString(), handler); - StartCoroutine(ExecuteQuery(query, guid.ToString())); - } - - - public void RequestSimilarAndThen(SimilarQuery query, Action> handler) { - queryFinishedCallback = handler; - StartCoroutine(ExecuteQuery(query)); - } - - public void RequestWeightedSimilarAndThen(SimilarQuery query, CategoryRatio ratio, - Action> handler) { - queryFinishedCallback = handler; - StartCoroutine(ExecuteMultiQuery(query, ratio)); - } - - private IEnumerator ExecuteMultiQuery(SimilarQuery query, CategoryRatio ratio, string guid = null) { - // === SIMILAR === - // Initial SimilarQuery - yield return similarRequest = CineastUtils.BuildSimilarRequest(CineastUtils.Configuration.FindSimilarSegmentsUrl(), query); - - // Parse response - earlyBreak = !Parse(similarRequest.text, out similarResult); - yield return similarResult; - if (earlyBreak) { - yield break; - } - - // Check if empty - if (similarResult.IsEmpty()) { - earlyBreak = true; - yield break; // Stop and - } - - ContentObject[] tempResult = CineastUtils.ExtractContentObjects(similarResult); - - if (ratio != null && similarResult.results.Length > 1) { - ResultMerger merger = new ResultMerger(); - tempResult = merger.Merge(similarResult.results, ratio) - .ToArray(); - } - - // === SEGMENTS === - // segments - yield return segmentRequest = - CineastUtils.BuildSegmentRequest(CineastUtils.Configuration.FindSegmentsByIdUrl(), - CineastUtils.ExtractIdArray(tempResult)); - - // parse response - earlyBreak = !Parse(segmentRequest.text, out segmentResult); - yield return segmentResult; - if (earlyBreak) { - yield break; - } - - // === METAS === - yield return metaRequest = - CineastUtils.BuildMetadataRequest(CineastUtils.Configuration.FindMetadataUrl(), - CineastUtils.ExtractIdArray(segmentResult.content)); - earlyBreak = !Parse(metaRequest.text, out metaResult); - yield return metaResult; - if (earlyBreak) { - yield break; - } - // meta->mmo - objectList = CineastUtils.Convert(metaResult.content); - - // === OBJECTS === - yield return objectRequest = - CineastUtils.BuildObjectsRequest(CineastUtils.Configuration.FindObjectsUrl(), - CineastUtils.ExtractIdArray(objectList.ToArray())); - yield return objectsResult = JsonUtility.FromJson(objectRequest.text); - - // merge results - List objects = CineastUtils.Convert(objectsResult.content); - foreach (MultimediaObject mmo in objects) { - if (objectList.Contains(mmo)) { - objectList.Find(o => o.Equals(mmo)).Merge(mmo); - } - } - - results = new List(objectList); - - // === WRAPUP === - foreach (MultimediaObject mmo in objectList) { - mmo.resultIndex = CineastUtils.GetIndexOf(mmo, similarResult) + 1; - } - - // === SORT LIST === - objectList.Sort(Comparison); - - List transferList; - if (filterEngine != null) { -// logger.Debug("FilterEngine installed with " + filterEngine.GetFilterCount() + " filters."); - transferList = filterEngine.ApplyFilters(objectList); - } else { -// logger.Debug("No FilterEngine installed - no filtering"); - transferList = objectList; - } - - - // cleanup - finished = true; - if (guid == null) { - // LEGACY - if (queryFinishedCallback != null) { - // logger.Info("Query completed, passing resulting MultimediaObject list to callback"); - queryFinishedCallback.Invoke(transferList); - } - } else { - CineastResponseHandler> handler = _guidHandlerMap[guid]; - if (handler != null) { - handler.onSuccess(transferList); - } - } - - yield return true; - } - - - private IEnumerator ExecuteQuery(SimilarQuery query, string guid = null) { - // === SIMILAR === - // Initial SimilarQuery -// logger.Debug("Starting initial similar request.\n" + JsonUtility.ToJson(query)); - yield return similarRequest = CineastUtils.BuildSimilarRequest(CineastUtils.Configuration.FindSimilarSegmentsUrl(), query); -// logger.Debug("Received similar response: " + similarRequest.text); - - // Parse response - earlyBreak = !Parse(similarRequest.text, out similarResult); - yield return similarResult; - if (earlyBreak) { -// logger.Error("HTTP error upon similar response"); - yield break; - } - -// logger.Info("Successfully parsed similar response"); - - // Check if empty - if (similarResult.IsEmpty()) { - earlyBreak = true; -// logger.Error("Empty similar result"); - yield break; // Stop and - } - - // === SEGMENTS === - // segments -// logger.Debug("Starting segments query"); - yield return segmentRequest = - CineastUtils.BuildSegmentRequest(CineastUtils.Configuration.FindSegmentsByIdUrl(), - CineastUtils.ExtractIdArray(CineastUtils.ExtractContentObjects(similarResult))); - -// logger.Debug("Received segments response:\n" + segmentRequest.text); - // parse response - earlyBreak = !Parse(segmentRequest.text, out segmentResult); - yield return segmentResult; - if (earlyBreak) { -// logger.Error("HTTP error upon segments response"); - yield break; - } - -// logger.Info("Successfully parsed segments response"); - - // === METAS === -// logger.Debug("Starting metadata request"); - yield return metaRequest = - CineastUtils.BuildMetadataRequest(CineastUtils.Configuration.FindMetadataUrl(), - CineastUtils.ExtractIdArray(segmentResult.content)); -// logger.Debug("Received metadata response:\n" + metaRequest.text); - earlyBreak = !Parse(metaRequest.text, out metaResult); - yield return metaResult; - if (earlyBreak) { -// logger.Error("HTTP error upon metadata response"); - yield break; - } - -// logger.Info("Successfully parsed metadata response"); - // meta->mmo - - objectList = CineastUtils.Convert(metaResult.content); -// logger.Info("Successfully converted metadata result to MultimediaObjects"); - - - // === OBJECTS === -// logger.Debug("Starting object query"); - yield return objectRequest = - CineastUtils.BuildObjectsRequest(CineastUtils.Configuration.FindObjectsUrl(), - CineastUtils.ExtractIdArray(objectList.ToArray())); -// logger.Debug("Received objects response:\n" + objectRequest.text); - - yield return objectsResult = JsonUtility.FromJson(objectRequest.text); - -// logger.Info("Successfully parsed objects response"); - - // merge results - List objects = CineastUtils.Convert(objectsResult.content); -// logger.Debug("Successfully converted object result to MultimediaObjects"); - foreach (MultimediaObject mmo in objects) { - if (objectList.Contains(mmo)) { - objectList.Find(o => o.Equals(mmo)).Merge(mmo); - } - } - -// logger.Info("Finished merging different MultimediaObject lists"); - - results = new List(objectList); - - // === WRAPUP === -// logger.Debug("Applying result index to MultimediaObject list"); - foreach (MultimediaObject mmo in objectList) { - mmo.resultIndex = CineastUtils.GetIndexOf(mmo, similarResult) + 1; - } - -// logger.Info("Result contains " + objectList.Count + " entities"); -// logger.Debug("Full result list:\n" + DumpMMOList(objectList)); - - - // === SORT LIST === -// logger.Debug("Sorting list"); - objectList.Sort( - Comparison); -// logger.Debug("Sorted list: \n" + DumpMMOList(objectList)); - - List transferList; - if (filterEngine != null) { -// logger.Debug("FilterEngine installed with " + filterEngine.GetFilterCount() + " filters."); - transferList = filterEngine.ApplyFilters(objectList); - } else { -// logger.Debug("No FilterEngine installed - no filtering"); - transferList = objectList; - } - - - // cleanup - finished = true; - if (guid == null) { - // LEGACY - if (queryFinishedCallback != null) { - // logger.Info("Query completed, passing resulting MultimediaObject list to callback"); - queryFinishedCallback.Invoke(transferList); - } - } else { - CineastResponseHandler> handler = _guidHandlerMap[guid]; - if (handler != null) { - handler.onSuccess(transferList); - } - } - - yield return true; - } - - private int Comparison(MultimediaObject mmo1, MultimediaObject mmo2) { - return mmo1.resultIndex - mmo2.resultIndex; - } - - private string DumpMMOList(List list) { - var ret = "["; - - foreach (MultimediaObject mmo in list) { - ret += JsonUtility.ToJson(mmo); - ret += ","; - } - - return ret + "]"; - } - - - public SimilarResult GetSimilarResult() { - return similarResult; - } - - public bool HasFinished() { - return finished; - } - - public bool HasEarlyBreak() { - return earlyBreak; - } - - public SegmentResult GetSegmentResult() { - return segmentResult; - } - - public MetaDataResult GetMetaResult() { - return metaResult; - } - - public List GetMultimediaObjects() { - return objectList; - } - - private static bool HasHTTPErrorOccurred(string msg) { - return msg.StartsWith(""); - } - - /** - * RETURNS FALSE IF AN ERROR OCCURED - */ - private static bool Parse(string toParse, out T result) { - if (HasHTTPErrorOccurred(toParse)) { - result = default(T); - return false; - } - - result = JsonUtility.FromJson(toParse); - return true; - } - - public void Clean() { - objectList.Clear(); - } - - public void AddCineastFilter(FilterStrategy strategy) { - filterEngine.AddFilterStrategy(strategy); - } - - public List GetOriginalResults() { - return new List(results); - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models.meta deleted file mode 100644 index 6561c82..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 88b31a935862400d832160a4463c5bed -timeCreated: 1565163291 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages.meta deleted file mode 100644 index 57d80ff..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: c1221b36627c4e4e88fff4ed6fa81518 -timeCreated: 1565163291 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query.meta deleted file mode 100644 index 32db691..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 3dae074a31984c1c8dca213b6d89ffb1 -timeCreated: 1565163291 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/IdsQuery.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/IdsQuery.cs deleted file mode 100644 index 1516d96..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/IdsQuery.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Query -{ - [System.Serializable] - public class IdsQuery - { - public string[] ids; - - public IdsQuery(string[] ids) - { - this.ids = ids; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/ObjectQuery.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/ObjectQuery.cs deleted file mode 100644 index 698b2a3..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/ObjectQuery.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Query -{ - /* - * Stuff and things - */ - [System.Serializable] - public class ObjectQuery - { - public string[] ids; - - public ObjectQuery(string[] ids) - { - this.ids = ids; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/SimilarQuery.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/SimilarQuery.cs deleted file mode 100644 index 5fb6e7e..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/SimilarQuery.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Query -{ - [System.Serializable] - public class SimilarQuery - { - public string[] types = new[] {"IMAGE"}; - - public TermContainer[] containers; - - public SimilarQuery(TermContainer[] containers) - { - this.containers = containers; - } - - public void With(SimilarQuery query) - { - TermContainer[] tc = new[] {containers[0], query.containers[0]}; - containers = tc; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermContainer.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermContainer.cs deleted file mode 100644 index 15f20c1..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermContainer.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Query -{ - [System.Serializable] - public class TermContainer - { - public TermsObject[] terms; - - public TermContainer(TermsObject[] terms) - { - this.terms = terms; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermContainer.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermContainer.cs.meta deleted file mode 100644 index f3a0e7a..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermContainer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6f316f044d6f5134dba315bd85f9aada -timeCreated: 1496757666 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermsObject.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermsObject.cs deleted file mode 100644 index 90bf7c5..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermsObject.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Query -{ - [Serializable] - public class TermsObject - { - public const string SPATIAL_CATEGORY = "spatial"; - public const string LOCATION_TYPE = "LOCATION"; - - public const string TERMPORAL_CATEGORY = "temporal"; - public const string TIME_TYPE = "TIME"; - - - public const string IMAGE_TYPE = "IMAGE"; - public const string GLOBALCOLOR_CATEGORY = "globalcolor"; - public const string LOCALCOLOR_CATEGORY = "localcolor"; - public const string EDGE_CATEGORY = "edge"; - public const string QUANTIZED_CATEGORY = "quantized"; - - public string[] categories; - public string type; - - public string data; - - - - public TermsObject(string type, string[] categories) - { - this.type = type; - this.categories = categories; - } - - public static TermsObject BuildLocationTermsObject(double latitude, double longitude) - { - TermsObject built = new TermsObject(LOCATION_TYPE, new []{SPATIAL_CATEGORY}); - built.data = String.Format("[{0},{1}]", latitude, longitude); - return built; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermsObject.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermsObject.cs.meta deleted file mode 100644 index aa8af6a..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/TermsObject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6b80c5c2d1b65a24bb0732b643e0ed3a -timeCreated: 1496757666 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result.meta deleted file mode 100644 index 4907f85..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 807872efc0f848c1ac9a380b2f012837 -timeCreated: 1565163291 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/CineastObject.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/CineastObject.cs deleted file mode 100644 index c815f1f..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/CineastObject.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result -{ - [System.Serializable] - public class CineastObject - { - public string objectId; - public string name; - public string path; - public string mediatype; - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/CineastObject.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/CineastObject.cs.meta deleted file mode 100644 index dcceac9..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/CineastObject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 73c290d7a5f7eea4dbf66f2eba6f4291 -timeCreated: 1497784949 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ContentObject.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ContentObject.cs deleted file mode 100644 index 515536f..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ContentObject.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result -{ - [System.Serializable] - public class ContentObject : IComparable { - - public ContentObject() { - - } - - public ContentObject(string key, string value) { - this.key = key; - this.value = value; - } - - public string key; - public string value; - - public int CompareTo(ContentObject other) { - if (ReferenceEquals(this, other)) { - return 0; - } - - if (ReferenceEquals(null, other)) { - return 1; - } - - return string.Compare(value, other.value, StringComparison.Ordinal); - } - - public override string ToString() { - return string.Format("({0},{1})",key,value); - } - - public static string ArrayToStrig(ContentObject[] array) { - string[] temp = new string[array.Length]; - for (int i = 0; i < array.Length; i++) { - temp[i] = array[i].ToString(); - } - - return string.Join(", ", temp); - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ContentObject.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ContentObject.cs.meta deleted file mode 100644 index 5d2a3a8..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ContentObject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8ce68add3780b19488d27fbe09d0033b -timeCreated: 1496757666 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataObject.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataObject.cs deleted file mode 100644 index 5a6f36e..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataObject.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result -{ - [Serializable] - public class MetaDataObject - { - public string objectId; - public string domain; - public string key; - public string value; - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataObject.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataObject.cs.meta deleted file mode 100644 index cad3660..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataObject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3b8bc1e0dac20a64cb57d2cd5ce3a983 -timeCreated: 1496757666 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataResult.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataResult.cs deleted file mode 100644 index 45fe279..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataResult.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result -{ - [System.Serializable] - public class MetaDataResult - { - public const string MESSAGE_TYPE = "QR_METADATA"; - public string queryId; - public string messageType; - public MetaDataObject[] content; - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataResult.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataResult.cs.meta deleted file mode 100644 index f39da2b..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/MetaDataResult.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 0cd9527a78acd604f8462943b2a1de63 -timeCreated: 1496827604 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ObjectsResult.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ObjectsResult.cs deleted file mode 100644 index dbef856..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ObjectsResult.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result -{ - [System.Serializable] - public class ObjectsResult - { - public const string MESSAGE_TYPE = "QR_OBJECT"; - - public string queryId; - public string messageType; // QR_OBJECT - public CineastObject[] content; - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ObjectsResult.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ObjectsResult.cs.meta deleted file mode 100644 index cb7fc0e..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ObjectsResult.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b565da958412bb74782caa9b67992422 -timeCreated: 1497784949 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ResultObject.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ResultObject.cs deleted file mode 100644 index c031e99..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ResultObject.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result -{ - [System.Serializable] - public class ResultObject - { - public const string MESSAGE_TYPE = "QR_SIMILARITY"; - - public string queryId; - public string category; // spatial or later temporal? - public string messagetype; // QR_SIMILARITY - public ContentObject[] content; - - public bool IsEmpty() - { - return content.Length == 0; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ResultObject.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ResultObject.cs.meta deleted file mode 100644 index b71d05e..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/ResultObject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 95c74cbb3d9010d4cab51afd1c038a11 -timeCreated: 1496827604 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentObject.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentObject.cs deleted file mode 100644 index e12dcb9..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentObject.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result -{ - [System.Serializable] - public class SegmentObject - { - public string segmentId; - public string objectId; - public int start; - public int end; - public double startabs; - public double endabs; - public int count; - public int sequenceNumber; - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentObject.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentObject.cs.meta deleted file mode 100644 index 30abfba..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentObject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8c17537943190bb44bf9413568448ca0 -timeCreated: 1496757666 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentResult.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentResult.cs deleted file mode 100644 index 9b55315..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentResult.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result -{ - [System.Serializable] - public class SegmentResult - { - public const string MESSAGE_TYPE = "QR_SEGMENT"; - - public string queryId; - public string messageType; - public SegmentObject[] content; - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentResult.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentResult.cs.meta deleted file mode 100644 index cb48407..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SegmentResult.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 0ed08fe20334c1d4fa0cc91032713c91 -timeCreated: 1496827604 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SimilarResult.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SimilarResult.cs deleted file mode 100644 index ce5c08d..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SimilarResult.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result -{ - [System.Serializable] - public class SimilarResult - { - public string[] categories; - public ResultObject[] results; - - public bool IsEmpty() - { - return results.Length == 0; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SimilarResult.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SimilarResult.cs.meta deleted file mode 100644 index d8eee32..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Result/SimilarResult.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8ee23abdf796386408e7a1dcf70481cb -timeCreated: 1496827604 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/MultimediaObject.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/MultimediaObject.cs deleted file mode 100644 index dbeab76..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/MultimediaObject.cs +++ /dev/null @@ -1,183 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Utils; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models { - /** - * The object represents an object in cineast. - * An object has primarily an ID with which additional meta data is requestable. - * - * */ - [Serializable] - public class MultimediaObject : IEquatable { - private static readonly IdEqualityComparer comparer = new IdEqualityComparer(); - - public string datetime; - public string id; - - public double latitude = double.NaN; - public double longitude = double.NaN; - public double bearing = double.NaN; - - public string name; - public string path; - - public int resultIndex = -8; - - public bool Equals(MultimediaObject other) { - return comparer.Equals(this, other); - } - - public override string ToString() { - return base.ToString() + "[id=" + id + ", LAT=" + latitude + ", LON=" + longitude +", bearing="+bearing+ ", name=" + - (name ?? "NULL") + ", path=" + (path ?? "NULL") +", datetime="+(datetime ?? "NULL")+ "]"; - } - - - /** - * Adds the given meta data to this object. - * If the meta data has an unkown key or the ID is not matching, FALSE will be returned. - * */ - public bool AddMetaData(MetaDataObject meta) { - if (id.Equals(meta.objectId)) { - if (CineastUtils.KNOWN_KEYS.Contains(meta.key)) { - var changes = false; - switch (meta.key) { - case CineastUtils.LATITUDE_KEY: - if (double.IsNaN(latitude)) { - latitude = double.Parse(meta.value); - changes = true; - } - break; - case CineastUtils.LONGITUDE_KEY: - if (double.IsNaN(longitude)) { - longitude = double.Parse(meta.value); - changes = true; - } - break; - case CineastUtils.DATETIME_KEY: - if (datetime == null) { - datetime = meta.value; - changes = true; - } - break; - case CineastUtils.BEARING_KEY: - if (double.IsNaN(bearing)) { - bearing = double.Parse(meta.value); - changes = true; - } - break; - } - - return changes; - } - return false; - } - return false; - } - - /** - * Merges this and the passed object with a 'this-first' strategy. - * If any of the fields of this object are not set and - * the other object's corresponding field is set, the field - * of this object is then set with the value of the other object. - * - * Objects must have the same ID, otherwise no merge is performed - * - * @param other - The other object to merge into this object - * @return TRUE if a merge action happened - false otherwise - * */ - public bool Merge(MultimediaObject other) { - if (!Equals(other)) { - return false; - } - bool output; - output = MergeLat(other); - //Debug.Log("Merged lat: " + output); - output = MergeLon(other); - //Debug.Log("Merged lon: " + output); - output = MergeBearing(other); - //Debug.Log("Merged bearing: "+output); - output = MergeName(other); - //Debug.Log("Merged name: " + output); - output = MergePath(other); - //Debug.Log("Merged path: " + output); - output = MergeTime(other); - //Debug.Log("Merged time: " + output); - return output; - } - - private bool MergeBearing(MultimediaObject other) { - if (double.IsNaN(bearing) && !double.IsNaN(other.bearing)) { - bearing = other.bearing; - return true; - } - - return false; - } - - private bool MergeLat(MultimediaObject other) { - if (double.IsNaN(latitude) && !double.IsNaN(other.latitude)) { - latitude = other.latitude; - return true; - } - return false; - } - - private bool MergeLon(MultimediaObject other) { - if (double.IsNaN(longitude) && !double.IsNaN(other.longitude)) { - longitude = other.longitude; - return true; - } - return false; - } - - private bool MergeName(MultimediaObject other) { - if ((name == null) && (other.name != null)) { - name = other.name; - return true; - } - return false; - } - - private bool MergePath(MultimediaObject other) { - if ((path == null) && (other.path != null)) { - path = other.path; - return true; - } - return false; - } - - private bool MergeTime(MultimediaObject other) { - if ((datetime == null) && (other.datetime != null)) { - datetime = other.datetime; - return true; - } - return false; - } - - public sealed class IdEqualityComparer : IEqualityComparer { - public bool Equals(MultimediaObject x, MultimediaObject y) { - if (ReferenceEquals(x, y)) { - return true; - } - if (ReferenceEquals(x, null)) { - return false; - } - if (ReferenceEquals(y, null)) { - return false; - } - if (x.GetType() != y.GetType()) { - return false; - } - return string.Equals(x.id, y.id); - } - - public int GetHashCode(MultimediaObject obj) { - return obj.id != null ? obj.id.GetHashCode() : 0; - } - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/MultimediaObject.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/MultimediaObject.cs.meta deleted file mode 100644 index b8bad1c..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/MultimediaObject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6f7f9bf403dae1749ad97d32e0f190fe -timeCreated: 1497189969 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing.meta deleted file mode 100644 index e299efc..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 56dc1f1a76b54670ab919a805fb0db06 -timeCreated: 1565163426 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CategoryRatio.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CategoryRatio.cs deleted file mode 100644 index 79f6bb9..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CategoryRatio.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Processing { - public class CategoryRatio { - - private Dictionary ratios = new Dictionary(); - - private Guid guid; - - public CategoryRatio() { - guid = Guid.NewGuid(); - } - - public CategoryRatio(string[] categories, double[] weights) { - if (categories.Length != weights.Length) { - throw new IndexOutOfRangeException("Must have equal indices"); - } - - for (int i = 0; i < categories.Length; i++) { - ratios.Add(categories[i], weights[i]); - } - } - - public void AddWeight(string category, double wheight) { - ratios.Add(category, wheight); - } - - public double GetRatio(string category) { - return ratios[category]; - } - - private sealed class GuidEqualityComparer : IEqualityComparer { - public bool Equals(CategoryRatio x, CategoryRatio y) { - if (ReferenceEquals(x, y)) { - return true; - } - - if (ReferenceEquals(x, null)) { - return false; - } - - if (ReferenceEquals(y, null)) { - return false; - } - - if (x.GetType() != y.GetType()) { - return false; - } - - return x.guid.Equals(y.guid); - } - - public int GetHashCode(CategoryRatio obj) { - return obj.guid.GetHashCode(); - } - } - - private static readonly IEqualityComparer GuidComparerInstance = new GuidEqualityComparer(); - - public static IEqualityComparer GuidComparer - { - get { return GuidComparerInstance; } - } - - protected bool Equals(CategoryRatio other) { - return guid.Equals(other.guid); - } - - public override bool Equals(object obj) { - if (ReferenceEquals(null, obj)) { - return false; - } - - if (ReferenceEquals(this, obj)) { - return true; - } - - if (obj.GetType() != this.GetType()) { - return false; - } - - return Equals((CategoryRatio) obj); - } - - public override int GetHashCode() { - return guid.GetHashCode(); - } - - public override string ToString() { - StringBuilder sb = new StringBuilder("{"); - foreach (KeyValuePair pair in ratios) { - sb.Append(pair.Key).Append("=").Append(pair.Value).Append(','); - } - - string result = sb.ToString(); - result = result.TrimEnd(','); - return result+"}"; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CategoryRatio.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CategoryRatio.cs.meta deleted file mode 100644 index 0b7a5de..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CategoryRatio.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: fa4c4192e8704fffa18ea77289c09243 -timeCreated: 1529580604 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CineastResponseHandler.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CineastResponseHandler.cs deleted file mode 100644 index 44d2dd2..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CineastResponseHandler.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Processing { - - /// - /// Response handler for cineast quieries - /// - /// The type of the response - public interface CineastResponseHandler { - - /// - /// Callback upon success of the cineast query. - /// - /// The result of the query - void onSuccess(T result); - - - void onFailure(string reason); - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CineastResponseHandler.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CineastResponseHandler.cs.meta deleted file mode 100644 index d10e5b5..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/CineastResponseHandler.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 702851f256a849368890dd38cc379334 -timeCreated: 1565165597 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterEngine.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterEngine.cs deleted file mode 100644 index 8ff346b..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterEngine.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Collections.Generic; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Processing { - public class FilterEngine { - -// private Logger logger = LogManager.GetInstance().GetLogger(typeof(FilterEngine)); - - private Queue strategies = new Queue(); - - public void AddFilterStrategy(FilterStrategy strategy) { -// logger.Debug("Adding filter strategy: "+strategy.GetType().FullName); - strategies.Enqueue(strategy); - } - - public void Reset() { -// logger.Debug("Clearing filter list"); - strategies.Clear(); - } - - public List ApplyFilters(List list) { - - List working = new List(list); -// logger.Debug("Applying filters. Original list size: " + working.Count); - foreach (FilterStrategy strategy in strategies) { -// logger.Debug("Going to apply filter of "+strategy.ToString()); - working = strategy.applyFilter(working); - } - -// logger.Debug("Finished applying all filters. Remaining list size "+working.Count); - return working; - } - - public int GetFilterCount() { - return strategies.Count; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterEngine.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterEngine.cs.meta deleted file mode 100644 index 2c73540..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterEngine.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 78232dff884bebd4e8bc44895104fa2f -timeCreated: 1501775450 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterStrategy.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterStrategy.cs deleted file mode 100644 index e35de9a..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterStrategy.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Processing { - public interface FilterStrategy { - - /** - * Filters some mmos out and returnes the filtered list - */ - List applyFilter(List list); - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterStrategy.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterStrategy.cs.meta deleted file mode 100644 index 325b771..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/FilterStrategy.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 416f3d579b8d5bf4b8b9e91b2bd58981 -timeCreated: 1501775450 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/ResultMerger.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/ResultMerger.cs deleted file mode 100644 index c0d9b4a..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/ResultMerger.cs +++ /dev/null @@ -1,186 +0,0 @@ -using System; -using System.Collections.Generic; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Processing { - public class ResultMerger { - private sealed class Triple { - private string category; - private string key; - private double score; - - public string Category - { - get { return category; } - set { category = value; } - } - - public string Key - { - get { return key; } - set { key = value; } - } - - public double Score - { - get { return score; } - set { this.score = value; } - } - - public Triple(string category, string key, double score) { - this.category = category; - this.key = key; - this.score = score; - } - - public static Triple FromValues(string category, string key, string value) { - return new Triple(category, key, Convert.ToDouble(value)); - } - - private bool Equals(Triple other) { - return string.Equals(key, other.key); - } - - public override bool Equals(object obj) { - if (ReferenceEquals(null, obj)) { - return false; - } - - if (ReferenceEquals(this, obj)) { - return true; - } - - return obj is Triple && Equals((Triple) obj); - } - - public override int GetHashCode() { - return (key != null ? key.GetHashCode() : 0); - } - - private sealed class KeyEqualityComparer : IEqualityComparer { - public bool Equals(Triple x, Triple y) { - if (ReferenceEquals(x, y)) { - return true; - } - - if (ReferenceEquals(x, null)) { - return false; - } - - if (ReferenceEquals(y, null)) { - return false; - } - - if (x.GetType() != y.GetType()) { - return false; - } - - return string.Equals(x.key, y.key); - } - - public int GetHashCode(Triple obj) { - return (obj.key != null ? obj.key.GetHashCode() : 0); - } - } - - private static readonly IEqualityComparer KeyComparerInstance = new KeyEqualityComparer(); - - public static IEqualityComparer KeyComparer - { - get { return KeyComparerInstance; } - } - } - - /// - /// Merges multiple ResultObjects of different categories to a single list of ContentObjects. - /// The merge is based on a set of weights. - /// - /// An array of different ResultObjects for several categories - /// An array with weights for the different categories in the results array - /// A list of ContentObjects where the content's value is the weighted score per category. The list is sorted in descending order (the higher the value, the earlier in the list) - public List Merge(ResultObject[] results, CategoryRatio ratio) { - // Attetion! No sanity checks: Must be different result.categories, ratios must sum up to 1. - List totalResults = new List(); - List> scores = Prepare(results); - while (scores.Count > 0) { - List list = Pop(scores); - while (list.Count > 0) { - Triple needle = Pop(list); - bool lonely = true; - foreach (List haystack in scores) { - int size = haystack.Count; - for (int i = 0; i < size; i++) { - if (needle.Equals(haystack[i])) { - Triple t = haystack[i]; - totalResults.Add(MergeWeighted(needle.Key, new []{needle.Score, t.Score}, new []{ratio.GetRatio(needle.Category), ratio.GetRatio(t.Category)})); - haystack.Remove(t); - size--; - lonely = false; - } - } - } - if (lonely) { - double weightedScore = needle.Score * ratio.GetRatio(needle.Category); - totalResults.Add(new ContentObject(needle.Key, weightedScore.ToString())); - } - } - } - totalResults.Sort((a, b) => -1* a.CompareTo(b)); - - - return totalResults; - - } - - - private static T Pop(List list) { - if (list.Count >= 1) { - T t = list[0]; - list.RemoveAt(0); - return t; - } else { - return default(T); - } - } - - private List ConvertResultObject(ResultObject result) { - List output = new List(); - foreach (ContentObject co in result.content) { - output.Add(Triple.FromValues(result.category, co.key, co.value)); - } - - return output; - } - - private List> Prepare(ResultObject[] results) { - List> output = new List>(); - foreach (ResultObject ro in results) { - output.Add(ConvertResultObject(ro)); - } - - return output; - } - - /// - /// Merges the given scores based on the given weights and returns a new ContentObject (key-value pair) with - /// the specified key and the weighted sum as value. - /// The weighted sum is calculated by summing up the result of multiplying the i-th score with the i-th weight. - /// - /// The key to use for the ContentObject - /// An array of scores to merge. Size must match the weights' array - /// An array of weights. Size must match the scores' array. A weight is a floating point value in the interval 0 and 1 (inclusive) - /// - /// - private ContentObject MergeWeighted(string key, double[] scores, double[] weights) { - if (scores.Length != weights.Length) { - throw new IndexOutOfRangeException("Cannot merge scores if weights and scores do not correspond!"); - } - - double weightedScroe = 0; - for (int i = 0; i < scores.Length; i++) { - weightedScroe += scores[i] * weights[i]; - } - return new ContentObject(key, weightedScroe.ToString()); - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/ResultMerger.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/ResultMerger.cs.meta deleted file mode 100644 index 48263a0..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Processing/ResultMerger.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 92761df0a42749f2a2d63d8435375c6c -timeCreated: 1529580350 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest.meta deleted file mode 100644 index ee533fd..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: ad049918f97a44a7b0e403a78547a36e -timeCreated: 1572253765 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/IRestJsonResponseHandler.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/IRestJsonResponseHandler.cs deleted file mode 100644 index 8fe12e8..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/IRestJsonResponseHandler.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Rest -{ - public interface IRestJsonResponseHandler - { - void OnSuccess(T data); - - void OnHttpError(long code, string msg); - - void OnFailure(string msg); - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/IRestJsonResponseHandler.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/IRestJsonResponseHandler.cs.meta deleted file mode 100644 index d330a5a..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/IRestJsonResponseHandler.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 627e87cee11a422a97f3284b7b517f63 -timeCreated: 1572255064 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/RestInterface.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/RestInterface.cs deleted file mode 100644 index 42d454e..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/RestInterface.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections; -using System.Text; -using UnityEngine; -using UnityEngine.Networking; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Rest -{ - public class RestInterface - { - - public IEnumerator PostJson(string url, IRestJsonResponseHandler handler, object payload) - { - using (UnityWebRequest req = new UnityWebRequest(url)) - { - req.method = UnityWebRequest.kHttpVerbPOST; - req.SetRequestHeader("Content-Type", "application/json"); - var uploader = new UploadHandlerRaw(Encoding.UTF8.GetBytes(ToJson(payload))); - uploader.contentType = "application/json"; - var downloader = new DownloadHandlerBuffer(); - req.uploadHandler = uploader; - req.downloadHandler = downloader; - yield return req.SendWebRequest(); - - if (req.isHttpError) - { - handler.OnHttpError(req.responseCode, req.error); - }else if (req.isNetworkError) - { - handler.OnFailure(req.error); - } - else - { - handler.OnSuccess(FromJson(req.downloadHandler.text)); - } - } - } - - public T PostJsonBlocking(string url, object payload) - { - using (UnityWebRequest req = new UnityWebRequest(url)) - { - req.method = UnityWebRequest.kHttpVerbPOST; - req.SetRequestHeader("Content-Type","application/json"); - var uploader = new UploadHandlerRaw(Encoding.UTF8.GetBytes(ToJson(payload))); - uploader.contentType = "application/json"; - var downloader = new DownloadHandlerBuffer(); - req.uploadHandler = uploader; - req.downloadHandler = downloader; - var async = req.SendWebRequest(); - while (!async.isDone) - { - // waiting... - } - - if (req.isHttpError | req.isNetworkError) - { - return default(T); - } - else - { - return FromJson(req.downloadHandler.text); - } - } - } - - public T GetJsonBlocking(string url) - { - // TODO On failure? --> Optional? - using (UnityWebRequest req = UnityWebRequest.Get(url)) - { - var async = req.SendWebRequest(); - while (!async.isDone) - { - // waiting... - } - - if (req.isHttpError || req.isNetworkError) - { - return default(T); - } - else - { - return FromJson(req.downloadHandler.text); - } - } - } - - public IEnumerator GetJson(string url, IRestJsonResponseHandler handler) - { - using (UnityWebRequest req = UnityWebRequest.Get(url)) - { - yield return req.SendWebRequest(); - - if (req.isHttpError) - { - handler.OnHttpError(req.responseCode, req.error); - }else if (req.isNetworkError) - { - handler.OnFailure(req.error); - } - else - { - handler.OnSuccess(FromJson(req.downloadHandler.text)); - } - } - } - - private static T FromJson(string json) - { - return JsonUtility.FromJson(json); - } - - private static string ToJson(object obj) - { - return JsonUtility.ToJson(obj); - } - - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/RestInterface.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/RestInterface.cs.meta deleted file mode 100644 index 5b85566..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Rest/RestInterface.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 227d2491a8144c7691a42c8f33a2e6e6 -timeCreated: 1572253796 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils.meta deleted file mode 100644 index b2ffc65..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: ba7d6a570bb2416f9d4db6de9e43a5a2 -timeCreated: 1565163222 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CategoryConfig.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CategoryConfig.cs deleted file mode 100644 index 29b6c82..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CategoryConfig.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections.Generic; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Utils -{ - /// - /// Configuration model to map Cineast and GoFind categories - /// - [System.Serializable] - public class CategoryConfig - { - public string spatial; - public string temporal; - - // TODO Add QbE category stuff - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CategoryConfig.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CategoryConfig.cs.meta deleted file mode 100644 index 353568d..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CategoryConfig.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 04fa9787511f4b8aaf263debb1297a69 -timeCreated: 1574242242 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfiguration.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfiguration.cs deleted file mode 100644 index 6925a62..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfiguration.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.IO; -using UnityEngine; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Utils -{ - public class CineastConfiguration - { - public CineastConfiguration() - { - } - - public CineastConfiguration(string cineastHost, string imagesHost) - { - this.cineastHost = cineastHost; - this.imagesHost = imagesHost; - } - - public string cineastHost; - public string imagesHost; - public CategoryConfig categories; - - - public bool IsEmpty() - { - return string.IsNullOrEmpty(cineastHost) || string.IsNullOrEmpty(imagesHost); - } - - public const string API_VERSION = "api/v1/"; - public const string SIMILAR_QUERY_URL = "find/segments/similar"; - public const string SEGMENTS_QUERY_URL = "find/segments/by/id"; - public const string METAS_QUERY_URL = "find/metadata/by/id"; - public const string OBJECT_QUERY_URL = "find/objects/by/id"; - - public string FindSimilarSegmentsUrl() - { - return cineastHost + API_VERSION + SIMILAR_QUERY_URL; - } - - public string FindSegmentsByIdUrl() - { - return cineastHost + API_VERSION + SEGMENTS_QUERY_URL; - } - - public string FindMetadataUrl() - { - return cineastHost + API_VERSION + METAS_QUERY_URL; - } - - public string FindObjectsUrl() - { - return cineastHost + API_VERSION + OBJECT_QUERY_URL; - } - - public bool Store() - { - WriteJson(JsonUtility.ToJson(this), GetFilePath()); - return File.Exists(GetFilePath()); - } - - public const string FILE_NAME = "cineast"; - public const string FILE_EXTENSION = "json"; - public const string FILE_EXTENSION_LEGACY = "config"; - - public static Boolean HasConfig() - { - return File.Exists(GetFilePath()) || File.Exists(GetFilePath(true)); - } - - public static CineastConfiguration Load() - { - if (!HasConfig()) - { - throw new FileNotFoundException("Configuration not found", GetFilePath()); - } - - CineastConfiguration config = ReadJsonFirst(GetFilePath(), GetFilePath(true)); - - // Sanatize - if (!string.IsNullOrEmpty(config.cineastHost) && !config.cineastHost.EndsWith("/")) - { - config.cineastHost += "/"; - } - - if (!string.IsNullOrEmpty(config.imagesHost) && !config.imagesHost.EndsWith("/")) - { - config.imagesHost += "/"; - } - - return config; - } - - private static void WriteJson(string json, string path) - { - StreamWriter sw = File.CreateText(path); - sw.WriteLine(json); - sw.Flush(); - sw.Close(); - } - - private static T ReadJson(string path) - { - StreamReader sr = File.OpenText(path); - string content = sr.ReadToEnd(); - sr.Close(); - return UnityEngine.JsonUtility.FromJson(content); - } - - private static T ReadJsonFirst(params string[] paths) - { - foreach (string path in paths) - { - if (File.Exists(path)) - { - StreamReader sr = File.OpenText(path); - string content = sr.ReadToEnd(); - sr.Close(); - return UnityEngine.JsonUtility.FromJson(content); - } - } - - throw new FileNotFoundException("Configuration not found"); - } - - private static string GetFilePath(bool legacy = false) - { -#if UNITY_EDITOR - return Application.dataPath + "/" + $"{FILE_NAME}.{(legacy ? FILE_EXTENSION_LEGACY : FILE_EXTENSION)}"; -#elif UNITY_ANDROID - return Application.persistentDataPath + "/" + FILE_NAME; -#else - return Application.dataPath + "/" + $"{FILE_NAME}.{(legacy ? FILE_EXTENSION_LEGACY : FILE_EXTENSION)}"; -#endif - } - - public static void StoreEmpty() - { - WriteJson(JsonUtility.ToJson(new CineastConfiguration()), GetFilePath()); - } - - public static CineastConfiguration GetDefault() - { - var config = new CineastConfiguration("http://localhost:4567/", "http://localhost/"); - var map = new CategoryConfig(); - map.spatial = "spatialdistance"; - map.temporal = "temporaldistance"; - config.categories = map; - return config; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfiguration.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfiguration.cs.meta deleted file mode 100644 index bc8f5bc..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfiguration.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 6cc9e3bc0c264ff9a5c143f99faaca19 -timeCreated: 1535986528 \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastUtils.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastUtils.cs deleted file mode 100644 index 612597e..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastUtils.cs +++ /dev/null @@ -1,321 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Query; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Result; -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Processing; -using UnityEngine; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Utils -{ - /** - * Utilities related to cineast API. - */ - public static class CineastUtils - { - /** - * The key of meta 'latitude' - * */ - public const string LATITUDE_KEY = "latitude"; - /** - * The key of meta 'longitude' - */ - public const string LONGITUDE_KEY = "longitude"; - /** - * The key of meta 'datetime' - */ - public const string DATETIME_KEY = "datetime"; - public const string BEARING_KEY = "bearing"; - - public static readonly string[] KNOWN_KEYS = {LATITUDE_KEY, LONGITUDE_KEY, DATETIME_KEY, BEARING_KEY}; - - - public static readonly CategoryRatio QUERY_BY_EXAMPLE_EDGE_GLOBALCOL = new CategoryRatio(new[] {TermsObject.EDGE_CATEGORY, TermsObject.GLOBALCOLOR_CATEGORY}, new[] {0.5, 0.5}); - public static readonly CategoryRatio QBE_GLOBAL_LOCAL_EDGE_EQUAL_RATIO = new CategoryRatio(new [] {TermsObject.EDGE_CATEGORY, TermsObject.GLOBALCOLOR_CATEGORY, TermsObject.LOCALCOLOR_CATEGORY}, new []{1d/3d, 1d/3d, 1d/3d}); - - public static CategoryRatio CreateUniformRatio(string[] categories) { - CategoryRatio cr = new CategoryRatio(); - - foreach (string category in categories) { - cr.AddWeight(category, 1d/categories.Length); - } - - return cr; - } - - public static CategoryRatio CreateUniformRatio(SimilarQuery query) { - CategoryRatio cr = new CategoryRatio(); - - List categories = new List(); - - foreach (TermContainer tc in query.containers) { - foreach (TermsObject to in tc.terms) { - categories.AddRange(to.categories); - } - } - - foreach (string category in categories) { - cr.AddWeight(category, 1d/categories.Count); - } - - return cr; - } - - /** - * Creates an object of a given metadataobject and sets the meta data - * - * Currently is only lat/lon supported - * - * @param meta - the meta data object. - * - * */ - public static MultimediaObject ConvertFrom(MetaDataObject meta) - { - MultimediaObject output = new MultimediaObject(); - output.id = meta.objectId; - output.AddMetaData(meta); - return output; - } - - public static MultimediaObject ConvertFrom(CineastObject obj) - { - MultimediaObject output = new MultimediaObject(); - output.id = obj.objectId; - output.name = obj.name; - output.path = obj.path; - return output; - } - - public static List Convert(MetaDataObject[] metas) - { - List objects = new List(); - - foreach (MetaDataObject meta in metas) - { - MultimediaObject obj = ConvertFrom(meta); - if (objects.Contains(obj)) - { - objects.Find(o => o.Equals(obj)).Merge(obj); - } - else - { - objects.Add(obj); - } - } - - return objects; - } - - public static List Convert(CineastObject[] objects) - { - List list = new List(); - foreach (CineastObject obj in objects) - { - MultimediaObject mmo = ConvertFrom(obj); - if (list.Contains(mmo)) - { - list.Find(o => o.Equals(mmo)).Merge(mmo); - } - else - { - list.Add(mmo); - } - } - - return list; - } - - public static CineastConfiguration Configuration { get; set; } - - - /** - * Generates a WWW object with given params - * - * @param url - A string which represents the url - * @param json - The json data to send, as a string - * - */ - public static WWW GenerateJSONPostRequest(string url, string json) - { - Hashtable headers = new Hashtable(); - headers.Add("Content-Type", "application/json"); - Debug.Log("Target URL: " + url + "\nPost data:\n" + json); - byte[] postData = Encoding.ASCII.GetBytes(json.ToCharArray()); - return new WWW(url, - postData); - } - - - /** - * Builds a SimilarQuery and sends a request to the specified url. - * - * @param url - The url to the server - * @param lat - The latitude of the query - * @param lon - The longitude of the query - */ - public static WWW BuildSimilarRequest(string url, double lat, double lon) - { - SimilarQuery sQuery = QueryFactory.BuildSpatialSimilarQuery(lat, lon); - return GenerateJSONPostRequest(url, JsonUtility.ToJson(sQuery)); - } - - public static WWW BuildSimilarRequest(string url, string utcTime) - { - SimilarQuery sq = QueryFactory.BuildTemporalSimilarQuery(utcTime); - return GenerateJSONPostRequest(url, JsonUtility.ToJson(sq)); - } - - public static WWW BuildSimilarRequest(string url, SimilarQuery query) - { - return GenerateJSONPostRequest(url, JsonUtility.ToJson(query)); - } - - /** - * Extracts a string array containing only the Ids (aka the keys) of the given content object array. - * - * @param contentObjects - The array of content objects to extract the keys from. - * */ - public static string[] ExtractIdArray(ContentObject[] contentObjects) - { - List list = new List(); - foreach (ContentObject obj in contentObjects) - { - // TODO: At later stage: check value (aka score) - list.Add(obj.key); - - } - return list.ToArray(); - } - - /** - * Extracts a string array containing only the objectIds of the given segment object array. - * - * @param segemntObjects - The array of segment objects to extract the keys from. - * - */ - public static string[] ExtractIdArray(SegmentObject[] segmentObjects) - { - List list = new List(); - foreach (SegmentObject obj in segmentObjects) - { - list.Add(obj.objectId); - } - return list.ToArray(); - } - - public static ContentObject[] ExtractContentObjects(SimilarResult result) - { - return result.results[0].content; // TODO: Check if not empty? - } - - /** - * Builds a IdsQuery and sends a request to the specified url. - * - * @param url - The url to the server - * @param ids - The array of segment ids to request more data from - * */ - public static WWW BuildSegmentRequest(string url, string[] ids) - { - IdsQuery query = new IdsQuery(ids); - return GenerateJSONPostRequest(url, JsonUtility.ToJson(query)); - } - - /** - * Builds a MetaDataQuery and sends a request to the specified url. - * - * @param url - the url to the server - * @param objectIds -the array of object ids to request the metadata from - */ - public static WWW BuildMetadataRequest(string url, string[] objectIds) - { - ObjectQuery query = new ObjectQuery(objectIds); - return GenerateJSONPostRequest(url, JsonUtility.ToJson(query)); - } - - /** - * Extracts all the ids for a given MultimediaObject array. - * - */ - public static string[] ExtractIdArray(MultimediaObject[] objects) - { - List ids = new List(); - foreach (MultimediaObject obj in objects) - { - ids.Add(obj.id); - } - return ids.ToArray(); - } - - public static WWW BuildObjectsRequest(string url, string[] ids) - { - IdsQuery query = new IdsQuery(ids); - return GenerateJSONPostRequest(url, JsonUtility.ToJson(query)); - } - - public static string GetImageUrl(MultimediaObject mmo) - { - return Configuration.imagesHost + "/images/"+ mmo.path; - } - - public static string GetThumbnailUrl(MultimediaObject mmo) - { - return Configuration.imagesHost + "thumbnails/" + mmo.id + "/" + mmo.id + "_000001.png"; - } - - /** - * -1 == empty similar result - * -2 == empty result object - * -3 == not found - */ - public static int GetIndexOf(MultimediaObject needle, SimilarResult haystack) - { - if (haystack.IsEmpty()) - { - return -1; - } - foreach (ResultObject resultObject in haystack.results) - { - if (resultObject.IsEmpty()) - { - return -2; - } - foreach (ContentObject contentObject in resultObject.content) - { - if (contentObject.key.Equals(needle.id + "_1"))// FIX hardcoded segment id - { - return Array.IndexOf(resultObject.content, contentObject); - } - } - } - return -3; - } - - /// - /// Converts the given year (numerical value) to a ISO8601 conform timestamp. - /// This conversion isn't smart and doesn't check for negative values or too large ones. - /// - /// The year as a numerical value (usually a 4 digit, positive integer) - /// A ISO8601 conform timestamp string, set to January the first at noon in this year. No timezone specified - public static string ConvertYearToISO8601(int year) { - return ConvertToISO8601(year, 1, 1, 12, 0, 0); - } - - /// - /// Converts the given time specification to a ISO8601 conform timestamp representation. - /// This conversion isn't smart and doesn't perfrom any sanity checks (e.g. 0 < minutes < 59 ) - /// - /// - /// - /// - /// - /// - /// - /// - public static string ConvertToISO8601(int year, int month, int dayOfMonth, int hours, int minutes, int seconds) { - return string.Format("{0:D4}-{1:D2}-{2:D2}T{3:D2}:{4:D2}:{5:D2}Z",year,month,dayOfMonth,hours,minutes,seconds);// year-month-day[THH:MM:SSZ] - } - - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastUtils.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastUtils.cs.meta deleted file mode 100644 index dea4690..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastUtils.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 93db45eb3fcc11f4580d59acf1cd2b4f -timeCreated: 1497189969 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryFactory.cs b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryFactory.cs deleted file mode 100644 index bd8e1a3..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryFactory.cs +++ /dev/null @@ -1,95 +0,0 @@ -using CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Models.Messages.Query; - -namespace CineastUnityInterface.Runtime.Vitrivr.UnityInterface.CineastApi.Utils -{ - public static class QueryFactory - { - - public static SimilarQuery BuildSpatialSimilarQuery(double latitude, double longitude) - { - TermsObject to = BuildLocationTerm(latitude, longitude); - TermContainer tc = new TermContainer(new []{to}); - return new SimilarQuery(new []{tc}); - } - - public static SimilarQuery BuildTemporalSimilarQuery(string utcTime) - { - TermsObject to = BuildTimeTerm(utcTime); - TermContainer tc = new TermContainer(new[] { to }); - return new SimilarQuery(new[] { tc }); - } - - public static SimilarQuery BuildGlobalColEdgeSimilarQuery(string data) { - TermsObject to = new TermsObject(TermsObject.IMAGE_TYPE, new [] { - TermsObject.GLOBALCOLOR_CATEGORY, TermsObject.EDGE_CATEGORY - }); - to.data = data; - TermContainer tc = new TermContainer(new[] {to}); - return new SimilarQuery(new[]{tc}); - } - - public static SimilarQuery BuildMultiCategoryQuery(string[] categories, string data) { - TermsObject to = new TermsObject(TermsObject.IMAGE_TYPE, categories); - to.data = data; - TermContainer tc = new TermContainer(new[]{to}); - return new SimilarQuery(new[]{tc}); - } - - public static SimilarQuery BuildMultiTermQuery(TermsObject[] terms) { - return new SimilarQuery(new[]{new TermContainer(terms) }); - } - - /// - /// Builds a new similarity query for the category 'edge'. - /// - /// A dataurl encoded image. - /// - public static SimilarQuery BuildEdgeSimilarQuery(string data) { - TermsObject to = BuildEdgeTerm(data); - TermContainer tc = new TermContainer(new[]{to}); - return new SimilarQuery(new[]{tc}); - } - - public static SimilarQuery BuildGlobalcolorSimilarQuery(string data) { - TermsObject to = BuildGlobalcolorTerm(data); - TermContainer tc = new TermContainer(new[]{to}); - return new SimilarQuery(new[]{tc}); - } - - public static TermsObject BuildLocationTerm(double latitude, double longitude) - { - var to = new TermsObject(TermsObject.LOCATION_TYPE, new[] - { - CineastUtils.Configuration.categories.spatial - }); - to.data = string.Format("[{0},{1}]", latitude, longitude); - return to; - } - - public static TermsObject BuildEdgeTerm(string data) { - var to = new TermsObject(TermsObject.IMAGE_TYPE, new []{TermsObject.EDGE_CATEGORY}); - to.data = data; - return to; - } - - public static TermsObject BuildQbETerm(string data) { - var to = new TermsObject(TermsObject.IMAGE_TYPE, new[]{TermsObject.EDGE_CATEGORY,TermsObject.GLOBALCOLOR_CATEGORY}); - to.data = data; - return to; - } - - public static TermsObject BuildGlobalcolorTerm(string data) { - var to = new TermsObject(TermsObject.IMAGE_TYPE, new []{TermsObject.GLOBALCOLOR_CATEGORY}); - to.data = data; - return to; - } - - public static TermsObject BuildTimeTerm(string utcTime) - { - var to = new TermsObject(TermsObject.TIME_TYPE, - new[] {CineastUtils.Configuration.categories.temporal}); - to.data = utcTime; - return to; - } - } -} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryFactory.cs.meta b/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryFactory.cs.meta deleted file mode 100644 index 05e0bd0..0000000 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryFactory.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a9f766b6e3841e74daad026eed4d5922 -timeCreated: 1499244995 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Tests/Editor/.gitkeep b/Assets/CineastUnityInterface/Tests/Editor/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Assets/CineastUnityInterface/Tests/Runtime/.gitkeep b/Assets/CineastUnityInterface/Tests/Runtime/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Assets/CineastUnityInterface/package.json b/Assets/CineastUnityInterface/package.json deleted file mode 100644 index d7b3a50..0000000 --- a/Assets/CineastUnityInterface/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "com.vitrivr.unityinterface.cineastapi", - "version": "0.0.2", - "displayName": "Cineast Unity Interface", - "description": "An all-unity client for [Cineast](https://github.com/vitrivr/cineast/)", - "unity": "2018.3", - "keywords": [ - "cineast","restclient" - ], - "author": { - "name": "Loris Sauter", - "email": "loris.sauter@unibas.ch" - } -} \ No newline at end of file diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta deleted file mode 100644 index bc50bf9..0000000 --- a/Assets/Plugins.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3895374d96a472b4cb38c217299cae06 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Editor.meta b/Assets/Plugins/Editor.meta deleted file mode 100644 index b4c2100..0000000 --- a/Assets/Plugins/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 23ebad82663bce9479d5be7b7ad75bcc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Editor/JetBrains.meta b/Assets/Plugins/Editor/JetBrains.meta deleted file mode 100644 index 326e211..0000000 --- a/Assets/Plugins/Editor/JetBrains.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b98ead8a888086f4aa0398cd14fa2fa5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll b/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll deleted file mode 100644 index 67915ac..0000000 Binary files a/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll and /dev/null differ diff --git a/Assets/cineast.json b/Assets/cineast.json deleted file mode 100644 index be644e5..0000000 --- a/Assets/cineast.json +++ /dev/null @@ -1 +0,0 @@ -{"cineastHost":"","imagesHost":"","categories":{}} diff --git a/Assets/main.unity b/Assets/main.unity deleted file mode 100644 index 6632393..0000000 --- a/Assets/main.unity +++ /dev/null @@ -1,261 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 8 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1} ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 9 - m_Resolution: 2 - m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &498263602 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 498263604} - - component: {fileID: 498263603} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &498263603 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 498263602} - m_Enabled: 1 - serializedVersion: 8 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 4 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &498263604 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 498263602} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &1249450741 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1249450745} - - component: {fileID: 1249450744} - - component: {fileID: 1249450743} - - component: {fileID: 1249450742} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1249450742 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1249450741} - m_Enabled: 1 ---- !u!124 &1249450743 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1249450741} - m_Enabled: 1 ---- !u!20 &1249450744 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1249450741} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1249450745 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1249450741} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/CineastUnityInterface/CHANGELOG.md b/CHANGELOG.md similarity index 52% rename from Assets/CineastUnityInterface/CHANGELOG.md rename to CHANGELOG.md index 175f21f..a44ef61 100644 --- a/Assets/CineastUnityInterface/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,35 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + ## [Unreleased] +### Added + +- Proper Cineast API support, based on OpenApi generated client +- For Devs: Automation regarding OpenApi code generation +- Lazy loading of results + +### Changed + +- Full rework of entire API +- Cleanup of interface for users of this API +- Result processing / handling +- Changed to proper async behaviour +- Legacy Cineast Api is now marked as such + +### Deprecated + +- Entire CineastApi is now legacy and deprecated. + + +## [1.0.0-SNAPSHOT] + +### Added + +- Full support of Cineast API, based on OpenApi generated client + ## [0.0.2] ### Added @@ -14,10 +41,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - RESTful interface for JSON communication over HTTP using UnityWebRequest. GET and POST supported as for now - Configuration options to map cineast categories to your custom ones. -### Miscellaneous - -- Clean - ## [0.0.1] ### Added diff --git a/Assets/CineastUnityInterface/CHANGELOG.md.meta b/CHANGELOG.md.meta similarity index 100% rename from Assets/CineastUnityInterface/CHANGELOG.md.meta rename to CHANGELOG.md.meta diff --git a/Assets/CineastUnityInterface/Documentation.meta b/Documentation.meta similarity index 100% rename from Assets/CineastUnityInterface/Documentation.meta rename to Documentation.meta diff --git a/Documentation/Vitrivr.UnityInterface.CineastApi.md b/Documentation/Vitrivr.UnityInterface.CineastApi.md new file mode 100644 index 0000000..cc7153d --- /dev/null +++ b/Documentation/Vitrivr.UnityInterface.CineastApi.md @@ -0,0 +1,9 @@ +# Cineast Unity Interface + +Documentation of the Cineast Unity Interface. + +## Usage + +Use the functions within `CineastWrapper.cs` to send requests to Cineast. + +A `cineastapi.json` configuration file conforming to `CineastConfig.cs` must be placed either in the `Assets` directory (when used in the Unity editor) or the persistent data path (depends on platform) in a standalone build. \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Documentation/Vitrivr.UnityInterface.CineastApi.md.meta b/Documentation/Vitrivr.UnityInterface.CineastApi.md.meta similarity index 100% rename from Assets/CineastUnityInterface/Documentation/Vitrivr.UnityInterface.CineastApi.md.meta rename to Documentation/Vitrivr.UnityInterface.CineastApi.md.meta diff --git a/Assets/CineastUnityInterface/LICENSE.md b/LICENSE.md similarity index 100% rename from Assets/CineastUnityInterface/LICENSE.md rename to LICENSE.md diff --git a/Assets/CineastUnityInterface/LICENSE.md.meta b/LICENSE.md.meta similarity index 100% rename from Assets/CineastUnityInterface/LICENSE.md.meta rename to LICENSE.md.meta diff --git a/Assets/main.unity.meta b/LICENSE.meta similarity index 74% rename from Assets/main.unity.meta rename to LICENSE.meta index 64257f8..c33124e 100644 --- a/Assets/main.unity.meta +++ b/LICENSE.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8e35687e7ad314641a378b00ff0e5e36 +guid: 9d0469844d7d94539a84268289996b99 DefaultImporter: externalObjects: {} userData: diff --git a/Packages/manifest.json b/Packages/manifest.json deleted file mode 100644 index 73c0efb..0000000 --- a/Packages/manifest.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "dependencies": { - "com.unity.ads": "2.0.8", - "com.unity.analytics": "3.2.2", - "com.unity.collab-proxy": "1.2.15", - "com.unity.package-manager-ui": "2.0.7", - "com.unity.purchasing": "2.0.3", - "com.unity.textmeshpro": "1.4.1", - "com.unity.modules.ai": "1.0.0", - "com.unity.modules.animation": "1.0.0", - "com.unity.modules.assetbundle": "1.0.0", - "com.unity.modules.audio": "1.0.0", - "com.unity.modules.cloth": "1.0.0", - "com.unity.modules.director": "1.0.0", - "com.unity.modules.imageconversion": "1.0.0", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.particlesystem": "1.0.0", - "com.unity.modules.physics": "1.0.0", - "com.unity.modules.physics2d": "1.0.0", - "com.unity.modules.screencapture": "1.0.0", - "com.unity.modules.terrain": "1.0.0", - "com.unity.modules.terrainphysics": "1.0.0", - "com.unity.modules.tilemap": "1.0.0", - "com.unity.modules.ui": "1.0.0", - "com.unity.modules.uielements": "1.0.0", - "com.unity.modules.umbra": "1.0.0", - "com.unity.modules.unityanalytics": "1.0.0", - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.modules.unitywebrequestassetbundle": "1.0.0", - "com.unity.modules.unitywebrequestaudio": "1.0.0", - "com.unity.modules.unitywebrequesttexture": "1.0.0", - "com.unity.modules.unitywebrequestwww": "1.0.0", - "com.unity.modules.vehicles": "1.0.0", - "com.unity.modules.video": "1.0.0", - "com.unity.modules.vr": "1.0.0", - "com.unity.modules.wind": "1.0.0", - "com.unity.modules.xr": "1.0.0" - } -} diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset deleted file mode 100644 index 27287fe..0000000 --- a/ProjectSettings/AudioManager.asset +++ /dev/null @@ -1,19 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!11 &1 -AudioManager: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Volume: 1 - Rolloff Scale: 1 - Doppler Factor: 1 - Default Speaker Mode: 2 - m_SampleRate: 0 - m_DSPBufferSize: 1024 - m_VirtualVoiceCount: 512 - m_RealVoiceCount: 32 - m_SpatializerPlugin: - m_AmbisonicDecoderPlugin: - m_DisableAudio: 0 - m_VirtualizeEffects: 1 - m_RequestedDSPBufferSize: 0 diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset deleted file mode 100644 index e7886b2..0000000 --- a/ProjectSettings/ClusterInputManager.asset +++ /dev/null @@ -1,6 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!236 &1 -ClusterInputManager: - m_ObjectHideFlags: 0 - m_Inputs: [] diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset deleted file mode 100644 index 8db40ea..0000000 --- a/ProjectSettings/DynamicsManager.asset +++ /dev/null @@ -1,33 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!55 &1 -PhysicsManager: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Gravity: {x: 0, y: -9.81, z: 0} - m_DefaultMaterial: {fileID: 0} - m_BounceThreshold: 2 - m_SleepThreshold: 0.005 - m_DefaultContactOffset: 0.01 - m_DefaultSolverIterations: 6 - m_DefaultSolverVelocityIterations: 1 - m_QueriesHitBackfaces: 0 - m_QueriesHitTriggers: 1 - m_EnableAdaptiveForce: 0 - m_ClothInterCollisionDistance: 0 - m_ClothInterCollisionStiffness: 0 - m_ContactsGeneration: 1 - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - m_AutoSimulation: 1 - m_AutoSyncTransforms: 0 - m_ReuseCollisionCallbacks: 0 - m_ClothInterCollisionSettingsToggle: 0 - m_ContactPairsMode: 0 - m_BroadphaseType: 0 - m_WorldBounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 250, y: 250, z: 250} - m_WorldSubdivisions: 8 - m_FrictionType: 0 - m_EnableEnhancedDeterminism: 0 - m_EnableUnifiedHeightmaps: 1 diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset deleted file mode 100644 index 0147887..0000000 --- a/ProjectSettings/EditorBuildSettings.asset +++ /dev/null @@ -1,8 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1045 &1 -EditorBuildSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Scenes: [] - m_configObjects: {} diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset deleted file mode 100644 index fb66ccf..0000000 --- a/ProjectSettings/EditorSettings.asset +++ /dev/null @@ -1,23 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!159 &1 -EditorSettings: - m_ObjectHideFlags: 0 - serializedVersion: 7 - m_ExternalVersionControlSupport: Hidden Meta Files - m_SerializationMode: 2 - m_LineEndingsForNewScripts: 2 - m_DefaultBehaviorMode: 0 - m_PrefabRegularEnvironment: {fileID: 0} - m_PrefabUIEnvironment: {fileID: 0} - m_SpritePackerMode: 0 - m_SpritePackerPaddingPower: 1 - m_EtcTextureCompressorBehavior: 1 - m_EtcTextureFastCompressor: 1 - m_EtcTextureNormalCompressor: 2 - m_EtcTextureBestCompressor: 4 - m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp - m_ProjectGenerationRootNamespace: - m_CollabEditorSettings: - inProgressEnabled: 1 - m_EnableTextureStreamingInPlayMode: 1 diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset deleted file mode 100644 index b23b253..0000000 --- a/ProjectSettings/GraphicsSettings.asset +++ /dev/null @@ -1,63 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!30 &1 -GraphicsSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_Deferred: - m_Mode: 1 - m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} - m_DeferredReflections: - m_Mode: 1 - m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} - m_ScreenSpaceShadows: - m_Mode: 1 - m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} - m_LegacyDeferred: - m_Mode: 1 - m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} - m_DepthNormals: - m_Mode: 1 - m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} - m_MotionVectors: - m_Mode: 1 - m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} - m_LightHalo: - m_Mode: 1 - m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} - m_LensFlare: - m_Mode: 1 - m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} - m_AlwaysIncludedShaders: - - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} - m_PreloadedShaders: [] - m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, - type: 0} - m_CustomRenderPipeline: {fileID: 0} - m_TransparencySortMode: 0 - m_TransparencySortAxis: {x: 0, y: 0, z: 1} - m_DefaultRenderingPath: 1 - m_DefaultMobileRenderingPath: 1 - m_TierSettings: [] - m_LightmapStripping: 0 - m_FogStripping: 0 - m_InstancingStripping: 0 - m_LightmapKeepPlain: 1 - m_LightmapKeepDirCombined: 1 - m_LightmapKeepDynamicPlain: 1 - m_LightmapKeepDynamicDirCombined: 1 - m_LightmapKeepShadowMask: 1 - m_LightmapKeepSubtractive: 1 - m_FogKeepLinear: 1 - m_FogKeepExp: 1 - m_FogKeepExp2: 1 - m_AlbedoSwatchInfos: [] - m_LightsUseLinearIntensity: 0 - m_LightsUseColorTemperature: 0 - m_LogWhenShaderIsCompiled: 0 diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset deleted file mode 100644 index 17c8f53..0000000 --- a/ProjectSettings/InputManager.asset +++ /dev/null @@ -1,295 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!13 &1 -InputManager: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Axes: - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: left - positiveButton: right - altNegativeButton: a - altPositiveButton: d - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: down - positiveButton: up - altNegativeButton: s - altPositiveButton: w - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left ctrl - altNegativeButton: - altPositiveButton: mouse 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left alt - altNegativeButton: - altPositiveButton: mouse 1 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left shift - altNegativeButton: - altPositiveButton: mouse 2 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: space - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse X - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse Y - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse ScrollWheel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 2 - joyNum: 0 - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 0 - type: 2 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 1 - type: 2 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 0 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 1 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 2 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 3 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: return - altNegativeButton: - altPositiveButton: joystick button 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: enter - altNegativeButton: - altPositiveButton: space - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Cancel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: escape - altNegativeButton: - altPositiveButton: joystick button 1 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset deleted file mode 100644 index 3b0b7c3..0000000 --- a/ProjectSettings/NavMeshAreas.asset +++ /dev/null @@ -1,91 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!126 &1 -NavMeshProjectSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - areas: - - name: Walkable - cost: 1 - - name: Not Walkable - cost: 1 - - name: Jump - cost: 2 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - m_LastAgentTypeID: -887442657 - m_Settings: - - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.75 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_SettingNames: - - Humanoid diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset deleted file mode 100644 index 6c5cf8a..0000000 --- a/ProjectSettings/Physics2DSettings.asset +++ /dev/null @@ -1,56 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!19 &1 -Physics2DSettings: - m_ObjectHideFlags: 0 - serializedVersion: 4 - m_Gravity: {x: 0, y: -9.81} - m_DefaultMaterial: {fileID: 0} - m_VelocityIterations: 8 - m_PositionIterations: 3 - m_VelocityThreshold: 1 - m_MaxLinearCorrection: 0.2 - m_MaxAngularCorrection: 8 - m_MaxTranslationSpeed: 100 - m_MaxRotationSpeed: 360 - m_BaumgarteScale: 0.2 - m_BaumgarteTimeOfImpactScale: 0.75 - m_TimeToSleep: 0.5 - m_LinearSleepTolerance: 0.01 - m_AngularSleepTolerance: 2 - m_DefaultContactOffset: 0.01 - m_JobOptions: - serializedVersion: 2 - useMultithreading: 0 - useConsistencySorting: 0 - m_InterpolationPosesPerJob: 100 - m_NewContactsPerJob: 30 - m_CollideContactsPerJob: 100 - m_ClearFlagsPerJob: 200 - m_ClearBodyForcesPerJob: 200 - m_SyncDiscreteFixturesPerJob: 50 - m_SyncContinuousFixturesPerJob: 50 - m_FindNearestContactsPerJob: 100 - m_UpdateTriggerContactsPerJob: 100 - m_IslandSolverCostThreshold: 100 - m_IslandSolverBodyCostScale: 1 - m_IslandSolverContactCostScale: 10 - m_IslandSolverJointCostScale: 10 - m_IslandSolverBodiesPerJob: 50 - m_IslandSolverContactsPerJob: 50 - m_AutoSimulation: 1 - m_QueriesHitTriggers: 1 - m_QueriesStartInColliders: 1 - m_CallbacksOnDisable: 1 - m_ReuseCollisionCallbacks: 0 - m_AutoSyncTransforms: 0 - m_AlwaysShowColliders: 0 - m_ShowColliderSleep: 1 - m_ShowColliderContacts: 0 - m_ShowColliderAABB: 0 - m_ContactArrowScale: 0.2 - m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} - m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} - m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} - m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/ProjectSettings/PresetManager.asset b/ProjectSettings/PresetManager.asset deleted file mode 100644 index 636a595..0000000 --- a/ProjectSettings/PresetManager.asset +++ /dev/null @@ -1,6 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1386491679 &1 -PresetManager: - m_ObjectHideFlags: 0 - m_DefaultList: [] diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset deleted file mode 100644 index 2ea28c0..0000000 --- a/ProjectSettings/ProjectSettings.asset +++ /dev/null @@ -1,595 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!129 &1 -PlayerSettings: - m_ObjectHideFlags: 0 - serializedVersion: 15 - productGUID: 2c92eb232f31c5f44bac56da0065c765 - AndroidProfiler: 0 - AndroidFilterTouchesWhenObscured: 0 - AndroidEnableSustainedPerformanceMode: 0 - defaultScreenOrientation: 4 - targetDevice: 2 - useOnDemandResources: 0 - accelerometerFrequency: 60 - companyName: DefaultCompany - productName: CineastUnityInterface - defaultCursor: {fileID: 0} - cursorHotspot: {x: 0, y: 0} - m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} - m_ShowUnitySplashScreen: 1 - m_ShowUnitySplashLogo: 1 - m_SplashScreenOverlayOpacity: 1 - m_SplashScreenAnimation: 1 - m_SplashScreenLogoStyle: 1 - m_SplashScreenDrawMode: 0 - m_SplashScreenBackgroundAnimationZoom: 1 - m_SplashScreenLogoAnimationZoom: 1 - m_SplashScreenBackgroundLandscapeAspect: 1 - m_SplashScreenBackgroundPortraitAspect: 1 - m_SplashScreenBackgroundLandscapeUvs: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - m_SplashScreenBackgroundPortraitUvs: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - m_SplashScreenLogos: [] - m_VirtualRealitySplashScreen: {fileID: 0} - m_HolographicTrackingLossScreen: {fileID: 0} - defaultScreenWidth: 1024 - defaultScreenHeight: 768 - defaultScreenWidthWeb: 960 - defaultScreenHeightWeb: 600 - m_StereoRenderingPath: 0 - m_ActiveColorSpace: 0 - m_MTRendering: 1 - m_StackTraceTypes: 010000000100000001000000010000000100000001000000 - iosShowActivityIndicatorOnLoading: -1 - androidShowActivityIndicatorOnLoading: -1 - iosAppInBackgroundBehavior: 0 - displayResolutionDialog: 1 - iosAllowHTTPDownload: 1 - allowedAutorotateToPortrait: 1 - allowedAutorotateToPortraitUpsideDown: 1 - allowedAutorotateToLandscapeRight: 1 - allowedAutorotateToLandscapeLeft: 1 - useOSAutorotation: 1 - use32BitDisplayBuffer: 1 - preserveFramebufferAlpha: 0 - disableDepthAndStencilBuffers: 0 - androidStartInFullscreen: 1 - androidRenderOutsideSafeArea: 0 - androidBlitType: 0 - defaultIsNativeResolution: 1 - macRetinaSupport: 1 - runInBackground: 0 - captureSingleScreen: 0 - muteOtherAudioSources: 0 - Prepare IOS For Recording: 0 - Force IOS Speakers When Recording: 0 - deferSystemGesturesMode: 0 - hideHomeButton: 0 - submitAnalytics: 1 - usePlayerLog: 1 - bakeCollisionMeshes: 0 - forceSingleInstance: 0 - resizableWindow: 0 - useMacAppStoreValidation: 0 - macAppStoreCategory: public.app-category.games - gpuSkinning: 0 - graphicsJobs: 0 - xboxPIXTextureCapture: 0 - xboxEnableAvatar: 0 - xboxEnableKinect: 0 - xboxEnableKinectAutoTracking: 0 - xboxEnableFitness: 0 - visibleInBackground: 1 - allowFullscreenSwitch: 1 - graphicsJobMode: 0 - fullscreenMode: 1 - xboxSpeechDB: 0 - xboxEnableHeadOrientation: 0 - xboxEnableGuest: 0 - xboxEnablePIXSampling: 0 - metalFramebufferOnly: 0 - xboxOneResolution: 0 - xboxOneSResolution: 0 - xboxOneXResolution: 3 - xboxOneMonoLoggingLevel: 0 - xboxOneLoggingLevel: 1 - xboxOneDisableEsram: 0 - xboxOnePresentImmediateThreshold: 0 - switchQueueCommandMemory: 1048576 - switchQueueControlMemory: 16384 - switchQueueComputeMemory: 262144 - switchNVNShaderPoolsGranularity: 33554432 - switchNVNDefaultPoolsGranularity: 16777216 - switchNVNOtherPoolsGranularity: 16777216 - vulkanEnableSetSRGBWrite: 0 - m_SupportedAspectRatios: - 4:3: 1 - 5:4: 1 - 16:10: 1 - 16:9: 1 - Others: 1 - bundleVersion: 1.0 - preloadedAssets: [] - metroInputSource: 0 - wsaTransparentSwapchain: 0 - m_HolographicPauseOnTrackingLoss: 1 - xboxOneDisableKinectGpuReservation: 0 - xboxOneEnable7thCore: 1 - isWsaHolographicRemotingEnabled: 0 - vrSettings: - cardboard: - depthFormat: 0 - enableTransitionView: 0 - daydream: - depthFormat: 0 - useSustainedPerformanceMode: 0 - enableVideoLayer: 0 - useProtectedVideoMemory: 0 - minimumSupportedHeadTracking: 0 - maximumSupportedHeadTracking: 1 - hololens: - depthFormat: 1 - depthBufferSharingEnabled: 1 - oculus: - sharedDepthBuffer: 1 - dashSupport: 1 - enable360StereoCapture: 0 - protectGraphicsMemory: 0 - enableFrameTimingStats: 0 - useHDRDisplay: 0 - m_ColorGamuts: 00000000 - targetPixelDensity: 30 - resolutionScalingMode: 0 - androidSupportedAspectRatio: 1 - androidMaxAspectRatio: 2.1 - applicationIdentifier: {} - buildNumber: {} - AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 16 - AndroidTargetSdkVersion: 0 - AndroidPreferredInstallLocation: 1 - aotOptions: - stripEngineCode: 1 - iPhoneStrippingLevel: 0 - iPhoneScriptCallOptimization: 0 - ForceInternetPermission: 0 - ForceSDCardPermission: 0 - CreateWallpaper: 0 - APKExpansionFiles: 0 - keepLoadedShadersAlive: 0 - StripUnusedMeshComponents: 0 - VertexChannelCompressionMask: 4054 - iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 9.0 - tvOSSdkVersion: 0 - tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: 9.0 - uIPrerenderedIcon: 0 - uIRequiresPersistentWiFi: 0 - uIRequiresFullScreen: 1 - uIStatusBarHidden: 1 - uIExitOnSuspend: 0 - uIStatusBarStyle: 0 - iPhoneSplashScreen: {fileID: 0} - iPhoneHighResSplashScreen: {fileID: 0} - iPhoneTallHighResSplashScreen: {fileID: 0} - iPhone47inSplashScreen: {fileID: 0} - iPhone55inPortraitSplashScreen: {fileID: 0} - iPhone55inLandscapeSplashScreen: {fileID: 0} - iPhone58inPortraitSplashScreen: {fileID: 0} - iPhone58inLandscapeSplashScreen: {fileID: 0} - iPadPortraitSplashScreen: {fileID: 0} - iPadHighResPortraitSplashScreen: {fileID: 0} - iPadLandscapeSplashScreen: {fileID: 0} - iPadHighResLandscapeSplashScreen: {fileID: 0} - appleTVSplashScreen: {fileID: 0} - appleTVSplashScreen2x: {fileID: 0} - tvOSSmallIconLayers: [] - tvOSSmallIconLayers2x: [] - tvOSLargeIconLayers: [] - tvOSLargeIconLayers2x: [] - tvOSTopShelfImageLayers: [] - tvOSTopShelfImageLayers2x: [] - tvOSTopShelfImageWideLayers: [] - tvOSTopShelfImageWideLayers2x: [] - iOSLaunchScreenType: 0 - iOSLaunchScreenPortrait: {fileID: 0} - iOSLaunchScreenLandscape: {fileID: 0} - iOSLaunchScreenBackgroundColor: - serializedVersion: 2 - rgba: 0 - iOSLaunchScreenFillPct: 100 - iOSLaunchScreenSize: 100 - iOSLaunchScreenCustomXibPath: - iOSLaunchScreeniPadType: 0 - iOSLaunchScreeniPadImage: {fileID: 0} - iOSLaunchScreeniPadBackgroundColor: - serializedVersion: 2 - rgba: 0 - iOSLaunchScreeniPadFillPct: 100 - iOSLaunchScreeniPadSize: 100 - iOSLaunchScreeniPadCustomXibPath: - iOSUseLaunchScreenStoryboard: 0 - iOSLaunchScreenCustomStoryboardPath: - iOSDeviceRequirements: [] - iOSURLSchemes: [] - iOSBackgroundModes: 0 - iOSMetalForceHardShadows: 0 - metalEditorSupport: 1 - metalAPIValidation: 1 - iOSRenderExtraFrameOnPause: 0 - appleDeveloperTeamID: - iOSManualSigningProvisioningProfileID: - tvOSManualSigningProvisioningProfileID: - iOSManualSigningProvisioningProfileType: 0 - tvOSManualSigningProvisioningProfileType: 0 - appleEnableAutomaticSigning: 0 - iOSRequireARKit: 0 - iOSAutomaticallyDetectAndAddCapabilities: 1 - appleEnableProMotion: 0 - clonedFromGUID: 00000000000000000000000000000000 - templatePackageId: - templateDefaultScene: - AndroidTargetArchitectures: 1 - AndroidSplashScreenScale: 0 - androidSplashScreen: {fileID: 0} - AndroidKeystoreName: - AndroidKeyaliasName: - AndroidBuildApkPerCpuArchitecture: 0 - AndroidTVCompatibility: 0 - AndroidIsGame: 1 - AndroidEnableTango: 0 - androidEnableBanner: 1 - androidUseLowAccuracyLocation: 0 - m_AndroidBanners: - - width: 320 - height: 180 - banner: {fileID: 0} - androidGamepadSupportLevel: 0 - resolutionDialogBanner: {fileID: 0} - m_BuildTargetIcons: [] - m_BuildTargetPlatformIcons: [] - m_BuildTargetBatching: [] - m_BuildTargetGraphicsAPIs: [] - m_BuildTargetVRSettings: [] - m_BuildTargetEnableVuforiaSettings: [] - openGLRequireES31: 0 - openGLRequireES31AEP: 0 - m_TemplateCustomTags: {} - mobileMTRendering: - Android: 1 - iPhone: 1 - tvOS: 1 - m_BuildTargetGroupLightmapEncodingQuality: [] - m_BuildTargetGroupLightmapSettings: [] - playModeTestRunnerEnabled: 0 - runPlayModeTestAsEditModeTest: 0 - actionOnDotNetUnhandledException: 1 - enableInternalProfiler: 0 - logObjCUncaughtExceptions: 1 - enableCrashReportAPI: 0 - cameraUsageDescription: - locationUsageDescription: - microphoneUsageDescription: - switchNetLibKey: - switchSocketMemoryPoolSize: 6144 - switchSocketAllocatorPoolSize: 128 - switchSocketConcurrencyLimit: 14 - switchScreenResolutionBehavior: 2 - switchUseCPUProfiler: 0 - switchApplicationID: 0x01004b9000490000 - switchNSODependencies: - switchTitleNames_0: - switchTitleNames_1: - switchTitleNames_2: - switchTitleNames_3: - switchTitleNames_4: - switchTitleNames_5: - switchTitleNames_6: - switchTitleNames_7: - switchTitleNames_8: - switchTitleNames_9: - switchTitleNames_10: - switchTitleNames_11: - switchTitleNames_12: - switchTitleNames_13: - switchTitleNames_14: - switchPublisherNames_0: - switchPublisherNames_1: - switchPublisherNames_2: - switchPublisherNames_3: - switchPublisherNames_4: - switchPublisherNames_5: - switchPublisherNames_6: - switchPublisherNames_7: - switchPublisherNames_8: - switchPublisherNames_9: - switchPublisherNames_10: - switchPublisherNames_11: - switchPublisherNames_12: - switchPublisherNames_13: - switchPublisherNames_14: - switchIcons_0: {fileID: 0} - switchIcons_1: {fileID: 0} - switchIcons_2: {fileID: 0} - switchIcons_3: {fileID: 0} - switchIcons_4: {fileID: 0} - switchIcons_5: {fileID: 0} - switchIcons_6: {fileID: 0} - switchIcons_7: {fileID: 0} - switchIcons_8: {fileID: 0} - switchIcons_9: {fileID: 0} - switchIcons_10: {fileID: 0} - switchIcons_11: {fileID: 0} - switchIcons_12: {fileID: 0} - switchIcons_13: {fileID: 0} - switchIcons_14: {fileID: 0} - switchSmallIcons_0: {fileID: 0} - switchSmallIcons_1: {fileID: 0} - switchSmallIcons_2: {fileID: 0} - switchSmallIcons_3: {fileID: 0} - switchSmallIcons_4: {fileID: 0} - switchSmallIcons_5: {fileID: 0} - switchSmallIcons_6: {fileID: 0} - switchSmallIcons_7: {fileID: 0} - switchSmallIcons_8: {fileID: 0} - switchSmallIcons_9: {fileID: 0} - switchSmallIcons_10: {fileID: 0} - switchSmallIcons_11: {fileID: 0} - switchSmallIcons_12: {fileID: 0} - switchSmallIcons_13: {fileID: 0} - switchSmallIcons_14: {fileID: 0} - switchManualHTML: - switchAccessibleURLs: - switchLegalInformation: - switchMainThreadStackSize: 1048576 - switchPresenceGroupId: - switchLogoHandling: 0 - switchReleaseVersion: 0 - switchDisplayVersion: 1.0.0 - switchStartupUserAccount: 0 - switchTouchScreenUsage: 0 - switchSupportedLanguagesMask: 0 - switchLogoType: 0 - switchApplicationErrorCodeCategory: - switchUserAccountSaveDataSize: 0 - switchUserAccountSaveDataJournalSize: 0 - switchApplicationAttribute: 0 - switchCardSpecSize: -1 - switchCardSpecClock: -1 - switchRatingsMask: 0 - switchRatingsInt_0: 0 - switchRatingsInt_1: 0 - switchRatingsInt_2: 0 - switchRatingsInt_3: 0 - switchRatingsInt_4: 0 - switchRatingsInt_5: 0 - switchRatingsInt_6: 0 - switchRatingsInt_7: 0 - switchRatingsInt_8: 0 - switchRatingsInt_9: 0 - switchRatingsInt_10: 0 - switchRatingsInt_11: 0 - switchLocalCommunicationIds_0: - switchLocalCommunicationIds_1: - switchLocalCommunicationIds_2: - switchLocalCommunicationIds_3: - switchLocalCommunicationIds_4: - switchLocalCommunicationIds_5: - switchLocalCommunicationIds_6: - switchLocalCommunicationIds_7: - switchParentalControl: 0 - switchAllowsScreenshot: 1 - switchAllowsVideoCapturing: 1 - switchAllowsRuntimeAddOnContentInstall: 0 - switchDataLossConfirmation: 0 - switchUserAccountLockEnabled: 0 - switchSystemResourceMemory: 16777216 - switchSupportedNpadStyles: 6 - switchNativeFsCacheSize: 32 - switchIsHoldTypeHorizontal: 0 - switchSupportedNpadCount: 8 - switchSocketConfigEnabled: 0 - switchTcpInitialSendBufferSize: 32 - switchTcpInitialReceiveBufferSize: 64 - switchTcpAutoSendBufferSizeMax: 256 - switchTcpAutoReceiveBufferSizeMax: 256 - switchUdpSendBufferSize: 9 - switchUdpReceiveBufferSize: 42 - switchSocketBufferEfficiency: 4 - switchSocketInitializeEnabled: 1 - switchNetworkInterfaceManagerInitializeEnabled: 1 - switchPlayerConnectionEnabled: 1 - ps4NPAgeRating: 12 - ps4NPTitleSecret: - ps4NPTrophyPackPath: - ps4ParentalLevel: 11 - ps4ContentID: ED1633-NPXX51362_00-0000000000000000 - ps4Category: 0 - ps4MasterVersion: 01.00 - ps4AppVersion: 01.00 - ps4AppType: 0 - ps4ParamSfxPath: - ps4VideoOutPixelFormat: 0 - ps4VideoOutInitialWidth: 1920 - ps4VideoOutBaseModeInitialWidth: 1920 - ps4VideoOutReprojectionRate: 60 - ps4PronunciationXMLPath: - ps4PronunciationSIGPath: - ps4BackgroundImagePath: - ps4StartupImagePath: - ps4StartupImagesFolder: - ps4IconImagesFolder: - ps4SaveDataImagePath: - ps4SdkOverride: - ps4BGMPath: - ps4ShareFilePath: - ps4ShareOverlayImagePath: - ps4PrivacyGuardImagePath: - ps4NPtitleDatPath: - ps4RemotePlayKeyAssignment: -1 - ps4RemotePlayKeyMappingDir: - ps4PlayTogetherPlayerCount: 0 - ps4EnterButtonAssignment: 2 - ps4ApplicationParam1: 0 - ps4ApplicationParam2: 0 - ps4ApplicationParam3: 0 - ps4ApplicationParam4: 0 - ps4DownloadDataSize: 0 - ps4GarlicHeapSize: 2048 - ps4ProGarlicHeapSize: 2560 - ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ - ps4pnSessions: 1 - ps4pnPresence: 1 - ps4pnFriends: 1 - ps4pnGameCustomData: 1 - playerPrefsSupport: 0 - enableApplicationExit: 0 - resetTempFolder: 1 - restrictedAudioUsageRights: 0 - ps4UseResolutionFallback: 0 - ps4ReprojectionSupport: 0 - ps4UseAudio3dBackend: 0 - ps4SocialScreenEnabled: 0 - ps4ScriptOptimizationLevel: 2 - ps4Audio3dVirtualSpeakerCount: 14 - ps4attribCpuUsage: 0 - ps4PatchPkgPath: - ps4PatchLatestPkgPath: - ps4PatchChangeinfoPath: - ps4PatchDayOne: 0 - ps4attribUserManagement: 0 - ps4attribMoveSupport: 0 - ps4attrib3DSupport: 0 - ps4attribShareSupport: 0 - ps4attribExclusiveVR: 0 - ps4disableAutoHideSplash: 0 - ps4videoRecordingFeaturesUsed: 0 - ps4contentSearchFeaturesUsed: 0 - ps4attribEyeToEyeDistanceSettingVR: 0 - ps4IncludedModules: [] - monoEnv: - splashScreenBackgroundSourceLandscape: {fileID: 0} - splashScreenBackgroundSourcePortrait: {fileID: 0} - spritePackerPolicy: - webGLMemorySize: 256 - webGLExceptionSupport: 1 - webGLNameFilesAsHashes: 0 - webGLDataCaching: 1 - webGLDebugSymbols: 0 - webGLEmscriptenArgs: - webGLModulesDirectory: - webGLTemplate: APPLICATION:Default - webGLAnalyzeBuildSize: 0 - webGLUseEmbeddedResources: 0 - webGLCompressionFormat: 1 - webGLLinkerTarget: 1 - webGLThreadsSupport: 0 - scriptingDefineSymbols: {} - platformArchitecture: {} - scriptingBackend: {} - il2cppCompilerConfiguration: {} - managedStrippingLevel: {} - incrementalIl2cppBuild: {} - allowUnsafeCode: 0 - additionalIl2CppArgs: - scriptingRuntimeVersion: 1 - apiCompatibilityLevelPerPlatform: {} - m_RenderingPath: 1 - m_MobileRenderingPath: 1 - metroPackageName: CineastUnityInterface - metroPackageVersion: - metroCertificatePath: - metroCertificatePassword: - metroCertificateSubject: - metroCertificateIssuer: - metroCertificateNotAfter: 0000000000000000 - metroApplicationDescription: CineastUnityInterface - wsaImages: {} - metroTileShortName: - metroTileShowName: 0 - metroMediumTileShowName: 0 - metroLargeTileShowName: 0 - metroWideTileShowName: 0 - metroSupportStreamingInstall: 0 - metroLastRequiredScene: 0 - metroDefaultTileSize: 1 - metroTileForegroundText: 2 - metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} - metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, - a: 1} - metroSplashScreenUseBackgroundColor: 0 - platformCapabilities: {} - metroTargetDeviceFamilies: {} - metroFTAName: - metroFTAFileTypes: [] - metroProtocolName: - metroCompilationOverrides: 1 - XboxOneProductId: - XboxOneUpdateKey: - XboxOneSandboxId: - XboxOneContentId: - XboxOneTitleId: - XboxOneSCId: - XboxOneGameOsOverridePath: - XboxOnePackagingOverridePath: - XboxOneAppManifestOverridePath: - XboxOneVersion: 1.0.0.0 - XboxOnePackageEncryption: 0 - XboxOnePackageUpdateGranularity: 2 - XboxOneDescription: - XboxOneLanguage: - - enus - XboxOneCapability: [] - XboxOneGameRating: {} - XboxOneIsContentPackage: 0 - XboxOneEnableGPUVariability: 1 - XboxOneSockets: {} - XboxOneSplashScreen: {fileID: 0} - XboxOneAllowedProductIds: [] - XboxOnePersistentLocalStorageSize: 0 - XboxOneXTitleMemory: 8 - xboxOneScriptCompiler: 0 - XboxOneOverrideIdentityName: - vrEditorSettings: - daydream: - daydreamIconForeground: {fileID: 0} - daydreamIconBackground: {fileID: 0} - cloudServicesEnabled: {} - luminIcon: - m_Name: - m_ModelFolderPath: - m_PortalFolderPath: - luminCert: - m_CertPath: - m_PrivateKeyPath: - luminIsChannelApp: 0 - luminVersion: - m_VersionCode: 1 - m_VersionName: - facebookSdkVersion: - facebookAppId: - facebookCookies: 1 - facebookLogging: 1 - facebookStatus: 1 - facebookXfbml: 0 - facebookFrictionlessRequests: 1 - apiCompatibilityLevel: 6 - cloudProjectId: - framebufferDepthMemorylessMode: 0 - projectName: - organizationId: - cloudEnabled: 0 - enableNativePlatformBackendsForNewInputSystem: 0 - disableOldInputManagerSupport: 0 - legacyClampBlendShapeWeights: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt deleted file mode 100644 index 3f8e52f..0000000 --- a/ProjectSettings/ProjectVersion.txt +++ /dev/null @@ -1 +0,0 @@ -m_EditorVersion: 2018.4.8f1 diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset deleted file mode 100644 index 92c2a3c..0000000 --- a/ProjectSettings/QualitySettings.asset +++ /dev/null @@ -1,229 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!47 &1 -QualitySettings: - m_ObjectHideFlags: 0 - serializedVersion: 5 - m_CurrentQuality: 5 - m_QualitySettings: - - serializedVersion: 2 - name: Very Low - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 15 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - blendWeights: 1 - textureQuality: 1 - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.3 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 4 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Low - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.4 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 16 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Medium - pixelLightCount: 1 - shadows: 1 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 1 - lodBias: 0.7 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 64 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: High - pixelLightCount: 2 - shadows: 2 - shadowResolution: 1 - shadowProjection: 1 - shadowCascades: 2 - shadowDistance: 40 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - blendWeights: 2 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 0 - softParticles: 0 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 1 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 256 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Very High - pixelLightCount: 3 - shadows: 2 - shadowResolution: 2 - shadowProjection: 1 - shadowCascades: 2 - shadowDistance: 70 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - blendWeights: 4 - textureQuality: 0 - anisotropicTextures: 2 - antiAliasing: 2 - softParticles: 1 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 1.5 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 1024 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Ultra - pixelLightCount: 4 - shadows: 2 - shadowResolution: 2 - shadowProjection: 1 - shadowCascades: 4 - shadowDistance: 150 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - blendWeights: 4 - textureQuality: 0 - anisotropicTextures: 2 - antiAliasing: 2 - softParticles: 1 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 2 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 4096 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - excludedTargetPlatforms: [] - m_PerPlatformDefaultQuality: - Android: 2 - Lumin: 5 - Nintendo Switch: 5 - PS4: 5 - Standalone: 5 - WebGL: 3 - Windows Store Apps: 5 - XboxOne: 5 - iPhone: 2 - tvOS: 2 diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset deleted file mode 100644 index 1c92a78..0000000 --- a/ProjectSettings/TagManager.asset +++ /dev/null @@ -1,43 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!78 &1 -TagManager: - serializedVersion: 2 - tags: [] - layers: - - Default - - TransparentFX - - Ignore Raycast - - - - Water - - UI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m_SortingLayers: - - name: Default - uniqueID: 0 - locked: 0 diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset deleted file mode 100644 index 558a017..0000000 --- a/ProjectSettings/TimeManager.asset +++ /dev/null @@ -1,9 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!5 &1 -TimeManager: - m_ObjectHideFlags: 0 - Fixed Timestep: 0.02 - Maximum Allowed Timestep: 0.33333334 - m_TimeScale: 1 - Maximum Particle Timestep: 0.03 diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset deleted file mode 100644 index fa0b146..0000000 --- a/ProjectSettings/UnityConnectSettings.asset +++ /dev/null @@ -1,34 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!310 &1 -UnityConnectSettings: - m_ObjectHideFlags: 0 - serializedVersion: 1 - m_Enabled: 0 - m_TestMode: 0 - m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events - m_EventUrl: https://cdp.cloud.unity3d.com/v1/events - m_ConfigUrl: https://config.uca.cloud.unity3d.com - m_TestInitMode: 0 - CrashReportingSettings: - m_EventUrl: https://perf-events.cloud.unity3d.com - m_Enabled: 0 - m_LogBufferSize: 10 - m_CaptureEditorExceptions: 1 - UnityPurchasingSettings: - m_Enabled: 0 - m_TestMode: 0 - UnityAnalyticsSettings: - m_Enabled: 0 - m_TestMode: 0 - m_InitializeOnStartup: 1 - UnityAdsSettings: - m_Enabled: 0 - m_InitializeOnStartup: 1 - m_TestMode: 0 - m_IosGameId: - m_AndroidGameId: - m_GameIds: {} - m_GameId: - PerformanceReportingSettings: - m_Enabled: 0 diff --git a/ProjectSettings/VFXManager.asset b/ProjectSettings/VFXManager.asset deleted file mode 100644 index 6e0eaca..0000000 --- a/ProjectSettings/VFXManager.asset +++ /dev/null @@ -1,11 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!937362698 &1 -VFXManager: - m_ObjectHideFlags: 0 - m_IndirectShader: {fileID: 0} - m_CopyBufferShader: {fileID: 0} - m_SortShader: {fileID: 0} - m_RenderPipeSettingsPath: - m_FixedTimeStep: 0.016666668 - m_MaxDeltaTime: 0.05 diff --git a/README.md b/README.md index 9823f40..0a986e7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # README -This is in very early development. Do not use in production. +**This is in very early development. Do not use in production.** ## Features @@ -8,32 +8,101 @@ This is a Unity3d endpoint for vitrivr's Cineast RESTful API. See [Cineast](https://github.com/vitrivr/cineast) for further API informations -## Usage +## Prerequisites -### Unity Package Manager +This package provides a Unity3d endpoint for vitrivr's Cineast RESTful API. +Thus, a running cineast instance is a requirement for this package to work. -To use this package with upm, add the following dependency to your `manifest.json`: +For a guide on how to setup cineast, please see [Cineast's Github page](https://github.com/vitrivr/cineast). +## Usage -- Unity3d + +To use this package in unity, the `manifest.json` has to be expanded by the following entry: + +```json +"com.vitrivr.unityinterface.cineastapi": "https://github.com/vitrivr/CineastUnityInterface.git" +``` + +The Unity Package Manager ( _upm_ ) will take care of downloading and linking this package. + +### Versions + +Besides using [semver]() to specify the package's version, there are two _upm_ packages available: + +* `#release` -- The latest released version of the package (semver version Major.Minor.Path) +* `#latest` -- Development versions of the package (semver version Major.Minor.Path-SNAPSHOT) + +In most of the cases you want to have the `#release` version. In case you would like to have the development version, +use this `manifest.json` entry: + +```json +"com.vitrivr.unityinterface.cineastapi": "https://github.com/vitrivr/UnityInterface.git#latest" ``` -"com.vitrivr.unityinterface.cineastapi": "https://github.com/vitrivr/CineastUnityInterface.git#release" + +The package was tested with Unity 2018.4 LTS. + +### Example + +_TODO_ + +### Documentation + +For the underlying API documentation, please refer to `Generated/README.md` and `Generated/docs/`. + +## Usage -- Developer + +This is a Unity3d project setup to easily develop (and test) the Unity3d Cineast Interface. +We strongly recommend cloning this repository into the `Assets` directory of a Unity shell project to make development and generation of `.meta` files easier. +To allow the shell project to function without compile errors, it is currently necessary to include the `jillejr.newtonsoft.json-for-unity` package as a workaround. Add the following to the root object in `manifest.json` on the same level as `dependencies`: +```json +"scopedRegistries": [ + { + "name": "Packages from jillejr", + "url": "https://npm.cloudsmith.io/jillejr/newtonsoft-json-for-unity/", + "scopes": ["jillejr"] + } +] ``` +And add the following line to the dependencies: `"jillejr.newtonsoft.json-for-unity": "12.0.201"` +To actively develop this package, follow these steps: + +1. If necessary, update the OpenApi Specs (OAS) of vitrivr. Reade more in [Generate OpenApi Dependencies](#generate-openapi-dependencies). +2. To test your changes and generate the **required** `.meta` files for any files you may have added, import the root directory of this repository into a Unity project as a local package with the `file:` method. +3. Do not forget to create a PR of your work to include it in the main branch. + +### Generate OpenApi Dependencies + +Follow these steps to generate / update the cineast OAS. We provide the latest generation in this repo for convenience. + +For unix systems, the build requires an installation of the [.NET Core SDK](https://dotnet.microsoft.com/), [wget](https://www.gnu.org/software/wget/) and [mono](https://www.mono-project.com). Mono and wget are available through [homebrew](https://brew.sh) on mac. -### API +1. Have an updated, running cineast api. +2. Issue the following `gradle` command: + ``` + $> ./gradlew clean deploy -Poas="http://cineast-host:port/openapi-specs" tidy + ``` + Replace `cineast-host:port` with your running cineast api. Most propably this will be the default (`localhost:4567`), in this case you can ommit the argument. +3. (Android Only) Delete the file `Runtime/Libs/Newtonsoft.Json.dll`. +4. Generate the **required** `.meta` files for generated files by importing the root directory of this repository into a Unity project as a local package with the `file:` method. -_coming soon_ +> _Notice_ +> These steps were tested under Windows 10 64bit, using OpenJDK 11 and Gradle 6.1.1. The publish script was tested with python 3.8.2. +> While these scripts are written with platform independence in mind, they might not work as expected. ## Contribution -One can contribute to this project by sumbitting a PR. +One can contribute to this project by submitting a PR. -### Publishing +## Contribtors -This API is published as a Unity Package Manager (_upm_) ready package. -To make it available to _upm_, one has to issue the `publish.py` script. + * Loris Sauter + * Florian Spiess -This requires [Git Subtree](https://github.com/mwitkow/git-subtree) to be installed. +## License +This work is licensed under the MIT open source license. Please refer to the LICENSE file. ---- +## Credits -Credits go to @neogeek, his [Tutorial](https://github.com/neogeek/unity-package-example) lead to the transformation to a proper _upm_ package. + * Credits go to @neogeek, his [Tutorial](https://github.com/neogeek/unity-package-example) lead to the transformation to a proper _upm_ package. + * Credits go to @SamuelBoerlin, his [first steps](https://github.com/SamuelBoerlin/Cineast-OpenAPI-Implementation) with Cienast and OpenApi helped a lot. diff --git a/Assets/CineastUnityInterface/README.md.meta b/README.md.meta similarity index 100% rename from Assets/CineastUnityInterface/README.md.meta rename to README.md.meta diff --git a/Assets/CineastUnityInterface/Tests/Runtime.meta b/Runtime.meta similarity index 77% rename from Assets/CineastUnityInterface/Tests/Runtime.meta rename to Runtime.meta index 42baf2c..6a6b004 100644 --- a/Assets/CineastUnityInterface/Tests/Runtime.meta +++ b/Runtime.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b6be570ac40619c47bad3e7c601ce710 +guid: 1b30421077a946bfb5a6b41b459b6d41 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/CineastUnityInterface.meta b/Runtime/Libs.meta similarity index 77% rename from Assets/CineastUnityInterface.meta rename to Runtime/Libs.meta index d3c5511..d3b1c09 100644 --- a/Assets/CineastUnityInterface.meta +++ b/Runtime/Libs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cf4888686266c0c40a6cc03f70d97508 +guid: e0cb5d965c89299458a8de497b83b655 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/Libs/JsonSubTypes.Cineast.dll b/Runtime/Libs/JsonSubTypes.Cineast.dll new file mode 100755 index 0000000..71fe39b Binary files /dev/null and b/Runtime/Libs/JsonSubTypes.Cineast.dll differ diff --git a/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.meta b/Runtime/Libs/JsonSubTypes.Cineast.dll.meta similarity index 79% rename from Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.meta rename to Runtime/Libs/JsonSubTypes.Cineast.dll.meta index 0111bee..3c82ded 100644 --- a/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.meta +++ b/Runtime/Libs/JsonSubTypes.Cineast.dll.meta @@ -1,22 +1,25 @@ fileFormatVersion: 2 -guid: 0c575aace71e45240872f637f7039564 +guid: 81aeea9e1a0c24e43968d5283e7cd527 PluginImporter: externalObjects: {} serializedVersion: 2 iconMap: {} executionOrder: {} + defineConstraints: [] isPreloaded: 0 - isOverridable: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 platformData: - first: Any: second: - enabled: 0 + enabled: 1 settings: {} - first: Editor: Editor second: - enabled: 1 + enabled: 0 settings: DefaultValueInitialized: true - first: diff --git a/Runtime/Libs/Newtonsoft.Json.Cineast.dll b/Runtime/Libs/Newtonsoft.Json.Cineast.dll new file mode 100755 index 0000000..e4a6339 Binary files /dev/null and b/Runtime/Libs/Newtonsoft.Json.Cineast.dll differ diff --git a/Runtime/Libs/Newtonsoft.Json.Cineast.dll.meta b/Runtime/Libs/Newtonsoft.Json.Cineast.dll.meta new file mode 100644 index 0000000..93cdb5c --- /dev/null +++ b/Runtime/Libs/Newtonsoft.Json.Cineast.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 9e387d50406944fe4be2d5b26b61522a +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Libs/Org.Vitrivr.CineastApi.dll b/Runtime/Libs/Org.Vitrivr.CineastApi.dll new file mode 100755 index 0000000..bdc3664 Binary files /dev/null and b/Runtime/Libs/Org.Vitrivr.CineastApi.dll differ diff --git a/Runtime/Libs/Org.Vitrivr.CineastApi.dll.meta b/Runtime/Libs/Org.Vitrivr.CineastApi.dll.meta new file mode 100644 index 0000000..61313e7 --- /dev/null +++ b/Runtime/Libs/Org.Vitrivr.CineastApi.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 34e9a0763e35a4aa1a26548734978e49 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Libs/Org.Vitrivr.CineastApi.xml b/Runtime/Libs/Org.Vitrivr.CineastApi.xml new file mode 100644 index 0000000..aa61fc8 --- /dev/null +++ b/Runtime/Libs/Org.Vitrivr.CineastApi.xml @@ -0,0 +1,7099 @@ + + + + Org.Vitrivr.CineastApi + + + + + MediaObjectDescriptor + + + + + Defines Mediatype + + + + + Enum VIDEO for value: VIDEO + + + + + Enum IMAGE for value: IMAGE + + + + + Enum AUDIO for value: AUDIO + + + + + Enum MODEL3D for value: MODEL3D + + + + + Enum IMAGESEQUENCE for value: IMAGE_SEQUENCE + + + + + Enum UNKNOWN for value: UNKNOWN + + + + + Gets or Sets Mediatype + + + + + Initializes a new instance of the class. + + objectId. + name. + path. + mediatype. + exists. + contentURL. + + + + Gets or Sets ObjectId + + + + + Gets or Sets Name + + + + + Gets or Sets Path + + + + + Gets or Sets Exists + + + + + Gets or Sets ContentURL + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if MediaObjectDescriptor instances are equal + + Instance of MediaObjectDescriptor to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + MetadataDomainFilter + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if MetadataDomainFilter instances are equal + + Instance of MetadataDomainFilter to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + ExtractionContainerMessage + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + items. + messageType. + + + + Gets or Sets Items + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if ExtractionContainerMessage instances are equal + + Instance of ExtractionContainerMessage to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + MediaSegmentQueryResult + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + content. + queryId. + messageType. + + + + Gets or Sets Content + + + + + Gets or Sets QueryId + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if MediaSegmentQueryResult instances are equal + + Instance of MediaSegmentQueryResult to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + TagsQueryResult + + + + + Initializes a new instance of the class. + + queryId. + tags. + + + + Gets or Sets QueryId + + + + + Gets or Sets Tags + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if TagsQueryResult instances are equal + + Instance of TagsQueryResult to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + SimilarityQueryResult + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + content. + queryId. + category. + containerId. + messageType. + + + + Gets or Sets Content + + + + + Gets or Sets QueryId + + + + + Gets or Sets Category + + + + + Gets or Sets ContainerId + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if SimilarityQueryResult instances are equal + + Instance of SimilarityQueryResult to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + FeaturesTextCategoryQueryResult + + + + + Initializes a new instance of the class. + + queryId. + featureValues. + category. + elementID. + + + + Gets or Sets QueryId + + + + + Gets or Sets FeatureValues + + + + + Gets or Sets Category + + + + + Gets or Sets ElementID + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if FeaturesTextCategoryQueryResult instances are equal + + Instance of FeaturesTextCategoryQueryResult to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + MediaObjectMetadataDescriptor + + + + + Initializes a new instance of the class. + + objectId. + domain. + key. + value. + exists. + + + + Gets or Sets ObjectId + + + + + Gets or Sets Domain + + + + + Gets or Sets Key + + + + + Gets or Sets Value + + + + + Gets or Sets Exists + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if MediaObjectMetadataDescriptor instances are equal + + Instance of MediaObjectMetadataDescriptor to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + MediaSegmentMetadataDescriptor + + + + + Initializes a new instance of the class. + + segmentId. + domain. + key. + value. + exists. + + + + Gets or Sets SegmentId + + + + + Gets or Sets Domain + + + + + Gets or Sets Key + + + + + Gets or Sets Value + + + + + Gets or Sets Exists + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if MediaSegmentMetadataDescriptor instances are equal + + Instance of MediaSegmentMetadataDescriptor to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + SimilarityQueryResultBatch + + + + + Initializes a new instance of the class. + + categories. + results. + + + + Gets or Sets Categories + + + + + Gets or Sets Results + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if SimilarityQueryResultBatch instances are equal + + Instance of SimilarityQueryResultBatch to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + DistinctElementsResult + + + + + Initializes a new instance of the class. + + queryId. + distinctElements. + + + + Gets or Sets QueryId + + + + + Gets or Sets DistinctElements + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if DistinctElementsResult instances are equal + + Instance of DistinctElementsResult to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + OptionallyFilteredIdList + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + filters. + ids. + messageType. + idList. + + + + Gets or Sets Filters + + + + + Gets or Sets Ids + + + + + Gets or Sets IdList + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if OptionallyFilteredIdList instances are equal + + Instance of OptionallyFilteredIdList to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + QueryConfig + + + + + Defines Hints + + + + + Enum Exact for value: exact + + + + + Enum Inexact for value: inexact + + + + + Enum Lsh for value: lsh + + + + + Enum Ecp for value: ecp + + + + + Enum Mi for value: mi + + + + + Enum Pq for value: pq + + + + + Enum Sh for value: sh + + + + + Enum Va for value: va + + + + + Enum Vaf for value: vaf + + + + + Enum Vav for value: vav + + + + + Enum Sequential for value: sequential + + + + + Enum Empirical for value: empirical + + + + + Gets or Sets Hints + + + + + Defines Distance + + + + + Enum Chisquared for value: chisquared + + + + + Enum Correlation for value: correlation + + + + + Enum Cosine for value: cosine + + + + + Enum Hamming for value: hamming + + + + + Enum Jaccard for value: jaccard + + + + + Enum Kullbackleibler for value: kullbackleibler + + + + + Enum Chebyshev for value: chebyshev + + + + + Enum Euclidean for value: euclidean + + + + + Enum Squaredeuclidean for value: squaredeuclidean + + + + + Enum Manhattan for value: manhattan + + + + + Enum Minkowski for value: minkowski + + + + + Enum Spannorm for value: spannorm + + + + + Enum Haversine for value: haversine + + + + + Gets or Sets Distance + + + + + Initializes a new instance of the class. + + queryId. + hints. + distance. + distanceWeights. + norm. + resultsPerModule. + maxResults. + relevantSegmentIds. + correspondenceFunctionIfEmpty. + distanceIfEmpty. + correspondenceFunction. + normIfEmpty. + distanceWeightsIfEmpty. + rawResultsPerModule. + + + + Gets or Sets QueryId + + + + + Gets or Sets DistanceWeights + + + + + Gets or Sets Norm + + + + + Gets or Sets ResultsPerModule + + + + + Gets or Sets MaxResults + + + + + Gets or Sets RelevantSegmentIds + + + + + Gets or Sets CorrespondenceFunctionIfEmpty + + + + + Gets or Sets DistanceIfEmpty + + + + + Gets or Sets CorrespondenceFunction + + + + + Gets or Sets NormIfEmpty + + + + + Gets or Sets DistanceWeightsIfEmpty + + + + + Gets or Sets RawResultsPerModule + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if QueryConfig instances are equal + + Instance of QueryConfig to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + StartSessionMessage + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + credentials. + messageType. + + + + Gets or Sets Credentials + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if StartSessionMessage instances are equal + + Instance of StartSessionMessage to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + ExtractionItemContainer + + + + + Initializes a new instance of the class. + + _object. + metadata. + uri. + + + + Gets or Sets Object + + + + + Gets or Sets Metadata + + + + + Gets or Sets Uri + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if ExtractionItemContainer instances are equal + + Instance of ExtractionItemContainer to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + MetadataKeyFilter + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if MetadataKeyFilter instances are equal + + Instance of MetadataKeyFilter to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + Credentials + + + + + Initializes a new instance of the class. + + username. + password. + + + + Gets or Sets Username + + + + + Gets or Sets Password + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if Credentials instances are equal + + Instance of Credentials to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + SimilarityQuery + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + containers. + config. + components. + messageType. + + + + Gets or Sets Containers + + + + + Gets or Sets Config + + + + + Gets or Sets Components + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if SimilarityQuery instances are equal + + Instance of SimilarityQuery to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + MediaSegmentMetadataQueryResult + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + content. + queryId. + messageType. + + + + Gets or Sets Content + + + + + Gets or Sets QueryId + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if MediaSegmentMetadataQueryResult instances are equal + + Instance of MediaSegmentMetadataQueryResult to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + MediaObjectMetadataQueryResult + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + content. + queryId. + messageType. + + + + Gets or Sets Content + + + + + Gets or Sets QueryId + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if MediaObjectMetadataQueryResult instances are equal + + Instance of MediaObjectMetadataQueryResult to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + AbstractMetadataFilterDescriptor + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + keywords. + type (required). + + + + Gets or Sets Keywords + + + + + Gets or Sets Type + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if AbstractMetadataFilterDescriptor instances are equal + + Instance of AbstractMetadataFilterDescriptor to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + IdList + + + + + Initializes a new instance of the class. + + ids. + + + + Gets or Sets Ids + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if IdList instances are equal + + Instance of IdList to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + QueryComponent + + + + + Initializes a new instance of the class. + + terms. + containerId. + + + + Gets or Sets Terms + + + + + Gets or Sets ContainerId + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if QueryComponent instances are equal + + Instance of QueryComponent to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + FeaturesAllCategoriesQueryResult + + + + + Initializes a new instance of the class. + + queryId. + featureMap. + elementID. + + + + Gets or Sets QueryId + + + + + Gets or Sets FeatureMap + + + + + Gets or Sets ElementID + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if FeaturesAllCategoriesQueryResult instances are equal + + Instance of FeaturesAllCategoriesQueryResult to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + StringDoublePair + + + + + Initializes a new instance of the class. + + key. + value. + + + + Gets or Sets Key + + + + + Gets or Sets Value + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if StringDoublePair instances are equal + + Instance of StringDoublePair to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + Ping + + + + + Defines Status + + + + + Enum UNKNOWN for value: UNKNOWN + + + + + Enum OK for value: OK + + + + + Enum ERROR for value: ERROR + + + + + Gets or Sets Status + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + status. + messageType. + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if Ping instances are equal + + Instance of Ping to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + ColumnSpecification + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + column. + table. + messageType. + + + + Gets or Sets Column + + + + + Gets or Sets Table + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if ColumnSpecification instances are equal + + Instance of ColumnSpecification to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + Tag + + + + + Initializes a new instance of the class. + + name. + id. + description. + + + + Gets or Sets Name + + + + + Gets or Sets Id + + + + + Gets or Sets Description + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if Tag instances are equal + + Instance of Tag to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + TagIDsForElementQueryResult + + + + + Initializes a new instance of the class. + + queryId. + tagIDs. + elementID. + + + + Gets or Sets QueryId + + + + + Gets or Sets TagIDs + + + + + Gets or Sets ElementID + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if TagIDsForElementQueryResult instances are equal + + Instance of TagIDsForElementQueryResult to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + SessionState + + + + + Defines Type + + + + + Enum UNAUTHENTICATED for value: UNAUTHENTICATED + + + + + Enum USER for value: USER + + + + + Enum ADMIN for value: ADMIN + + + + + Gets or Sets Type + + + + + Initializes a new instance of the class. + + id. + validUntil. + type. + sessionId. + + + + Gets or Sets Id + + + + + Gets or Sets ValidUntil + + + + + Gets or Sets SessionId + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if SessionState instances are equal + + Instance of SessionState to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + MediaObjectQueryResult + + + + + Defines MessageType + + + + + Enum PING for value: PING + + + + + Enum QSIM for value: Q_SIM + + + + + Enum QMLT for value: Q_MLT + + + + + Enum QNESEG for value: Q_NESEG + + + + + Enum QSEG for value: Q_SEG + + + + + Enum MLOOKUP for value: M_LOOKUP + + + + + Enum QTEMPORAL for value: Q_TEMPORAL + + + + + Enum SESSIONSTART for value: SESSION_START + + + + + Enum QRSTART for value: QR_START + + + + + Enum QREND for value: QR_END + + + + + Enum QRERROR for value: QR_ERROR + + + + + Enum QROBJECT for value: QR_OBJECT + + + + + Enum QRMETADATAO for value: QR_METADATA_O + + + + + Enum QRMETADATAS for value: QR_METADATA_S + + + + + Enum QRSEGMENT for value: QR_SEGMENT + + + + + Enum QRSIMILARITY for value: QR_SIMILARITY + + + + + Gets or Sets MessageType + + + + + Initializes a new instance of the class. + + content. + queryId. + messageType. + + + + Gets or Sets Content + + + + + Gets or Sets QueryId + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if MediaObjectQueryResult instances are equal + + Instance of MediaObjectQueryResult to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + QueryTerm + + + + + Defines Type + + + + + Enum IMAGE for value: IMAGE + + + + + Enum AUDIO for value: AUDIO + + + + + Enum MOTION for value: MOTION + + + + + Enum MODEL3D for value: MODEL3D + + + + + Enum LOCATION for value: LOCATION + + + + + Enum TIME for value: TIME + + + + + Enum TEXT for value: TEXT + + + + + Enum TAG for value: TAG + + + + + Enum SEMANTIC for value: SEMANTIC + + + + + Enum ID for value: ID + + + + + Enum BOOLEAN for value: BOOLEAN + + + + + Gets or Sets Type + + + + + Initializes a new instance of the class. + + type. + data. + categories. + + + + Gets or Sets Data + + + + + Gets or Sets Categories + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if QueryTerm instances are equal + + Instance of QueryTerm to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + MediaSegmentDescriptor + + + + + Initializes a new instance of the class. + + segmentId. + objectId. + start. + end. + startabs. + endabs. + count. + sequenceNumber. + + + + Gets or Sets SegmentId + + + + + Gets or Sets ObjectId + + + + + Gets or Sets Start + + + + + Gets or Sets End + + + + + Gets or Sets Startabs + + + + + Gets or Sets Endabs + + + + + Gets or Sets Count + + + + + Gets or Sets SequenceNumber + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if MediaSegmentDescriptor instances are equal + + Instance of MediaSegmentDescriptor to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + Represents a collection of functions to interact with the API endpoints + + + + + Get the status of the server + + + + + Thrown when fails to make API call + Ping + + + + Get the status of the server + + + + + Thrown when fails to make API call + ApiResponse of Ping + + + + Get the status of the server + + + + + Thrown when fails to make API call + Task of Ping + + + + Get the status of the server + + + + + Thrown when fails to make API call + Task of ApiResponse (Ping) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + + + + + + Initializes a new instance of the class + using Configuration object + + An instance of Configuration + + + + + Gets the base path of the API client. + + The base path + + + + Sets the base path of the API client. + + The base path + + + + Gets or sets the configuration object + + An instance of the Configuration + + + + Provides a factory method hook for the creation of exceptions. + + + + + Gets the default header. + + Dictionary of HTTP header + + + + Add default header. + + Header field name. + Header field value. + + + + + Get the status of the server + + Thrown when fails to make API call + Ping + + + + Get the status of the server + + Thrown when fails to make API call + ApiResponse of Ping + + + + Get the status of the server + + Thrown when fails to make API call + Task of Ping + + + + Get the status of the server + + Thrown when fails to make API call + Task of ApiResponse (Ping) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Find all objects for a certain type + + + Find all objects for a certain type + + Thrown when fails to make API call + MediaObjectQueryResult + + + + Find all objects for a certain type + + + Find all objects for a certain type + + Thrown when fails to make API call + ApiResponse of MediaObjectQueryResult + + + + Find object by specified attribute value. I.e by id, name or path + + + Find object by specified attribute value. I.e by id, name or path + + Thrown when fails to make API call + The attribute type of the value. One of: id, name, path + + MediaObjectQueryResult + + + + Find object by specified attribute value. I.e by id, name or path + + + Find object by specified attribute value. I.e by id, name or path + + Thrown when fails to make API call + The attribute type of the value. One of: id, name, path + + ApiResponse of MediaObjectQueryResult + + + + Find objects by id + + + Find objects by id + + Thrown when fails to make API call + (optional) + MediaObjectQueryResult + + + + Find objects by id + + + Find objects by id + + Thrown when fails to make API call + (optional) + ApiResponse of MediaObjectQueryResult + + + + Find all objects for a certain type + + + Find all objects for a certain type + + Thrown when fails to make API call + Task of MediaObjectQueryResult + + + + Find all objects for a certain type + + + Find all objects for a certain type + + Thrown when fails to make API call + Task of ApiResponse (MediaObjectQueryResult) + + + + Find object by specified attribute value. I.e by id, name or path + + + Find object by specified attribute value. I.e by id, name or path + + Thrown when fails to make API call + The attribute type of the value. One of: id, name, path + + Task of MediaObjectQueryResult + + + + Find object by specified attribute value. I.e by id, name or path + + + Find object by specified attribute value. I.e by id, name or path + + Thrown when fails to make API call + The attribute type of the value. One of: id, name, path + + Task of ApiResponse (MediaObjectQueryResult) + + + + Find objects by id + + + Find objects by id + + Thrown when fails to make API call + (optional) + Task of MediaObjectQueryResult + + + + Find objects by id + + + Find objects by id + + Thrown when fails to make API call + (optional) + Task of ApiResponse (MediaObjectQueryResult) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + + + + + + Initializes a new instance of the class + using Configuration object + + An instance of Configuration + + + + + Gets the base path of the API client. + + The base path + + + + Sets the base path of the API client. + + The base path + + + + Gets or sets the configuration object + + An instance of the Configuration + + + + Provides a factory method hook for the creation of exceptions. + + + + + Gets the default header. + + Dictionary of HTTP header + + + + Add default header. + + Header field name. + Header field value. + + + + + Find all objects for a certain type Find all objects for a certain type + + Thrown when fails to make API call + MediaObjectQueryResult + + + + Find all objects for a certain type Find all objects for a certain type + + Thrown when fails to make API call + ApiResponse of MediaObjectQueryResult + + + + Find all objects for a certain type Find all objects for a certain type + + Thrown when fails to make API call + Task of MediaObjectQueryResult + + + + Find all objects for a certain type Find all objects for a certain type + + Thrown when fails to make API call + Task of ApiResponse (MediaObjectQueryResult) + + + + Find object by specified attribute value. I.e by id, name or path Find object by specified attribute value. I.e by id, name or path + + Thrown when fails to make API call + The attribute type of the value. One of: id, name, path + + MediaObjectQueryResult + + + + Find object by specified attribute value. I.e by id, name or path Find object by specified attribute value. I.e by id, name or path + + Thrown when fails to make API call + The attribute type of the value. One of: id, name, path + + ApiResponse of MediaObjectQueryResult + + + + Find object by specified attribute value. I.e by id, name or path Find object by specified attribute value. I.e by id, name or path + + Thrown when fails to make API call + The attribute type of the value. One of: id, name, path + + Task of MediaObjectQueryResult + + + + Find object by specified attribute value. I.e by id, name or path Find object by specified attribute value. I.e by id, name or path + + Thrown when fails to make API call + The attribute type of the value. One of: id, name, path + + Task of ApiResponse (MediaObjectQueryResult) + + + + Find objects by id Find objects by id + + Thrown when fails to make API call + (optional) + MediaObjectQueryResult + + + + Find objects by id Find objects by id + + Thrown when fails to make API call + (optional) + ApiResponse of MediaObjectQueryResult + + + + Find objects by id Find objects by id + + Thrown when fails to make API call + (optional) + Task of MediaObjectQueryResult + + + + Find objects by id Find objects by id + + Thrown when fails to make API call + (optional) + Task of ApiResponse (MediaObjectQueryResult) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Find all tags + + + + + Thrown when fails to make API call + TagsQueryResult + + + + Find all tags + + + + + Thrown when fails to make API call + ApiResponse of TagsQueryResult + + + + Find all tags specified by attribute value + + + Find all tags by attributes id, name or matchingname and filter value + + Thrown when fails to make API call + The attribute to filter on. One of: id, name, matchingname + The value of the attribute to filter + TagsQueryResult + + + + Find all tags specified by attribute value + + + Find all tags by attributes id, name or matchingname and filter value + + Thrown when fails to make API call + The attribute to filter on. One of: id, name, matchingname + The value of the attribute to filter + ApiResponse of TagsQueryResult + + + + Find all tags by ids + + + + + Thrown when fails to make API call + (optional) + TagsQueryResult + + + + Find all tags by ids + + + + + Thrown when fails to make API call + (optional) + ApiResponse of TagsQueryResult + + + + Find all tags + + + + + Thrown when fails to make API call + Task of TagsQueryResult + + + + Find all tags + + + + + Thrown when fails to make API call + Task of ApiResponse (TagsQueryResult) + + + + Find all tags specified by attribute value + + + Find all tags by attributes id, name or matchingname and filter value + + Thrown when fails to make API call + The attribute to filter on. One of: id, name, matchingname + The value of the attribute to filter + Task of TagsQueryResult + + + + Find all tags specified by attribute value + + + Find all tags by attributes id, name or matchingname and filter value + + Thrown when fails to make API call + The attribute to filter on. One of: id, name, matchingname + The value of the attribute to filter + Task of ApiResponse (TagsQueryResult) + + + + Find all tags by ids + + + + + Thrown when fails to make API call + (optional) + Task of TagsQueryResult + + + + Find all tags by ids + + + + + Thrown when fails to make API call + (optional) + Task of ApiResponse (TagsQueryResult) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + + + + + + Initializes a new instance of the class + using Configuration object + + An instance of Configuration + + + + + Gets the base path of the API client. + + The base path + + + + Sets the base path of the API client. + + The base path + + + + Gets or sets the configuration object + + An instance of the Configuration + + + + Provides a factory method hook for the creation of exceptions. + + + + + Gets the default header. + + Dictionary of HTTP header + + + + Add default header. + + Header field name. + Header field value. + + + + + Find all tags + + Thrown when fails to make API call + TagsQueryResult + + + + Find all tags + + Thrown when fails to make API call + ApiResponse of TagsQueryResult + + + + Find all tags + + Thrown when fails to make API call + Task of TagsQueryResult + + + + Find all tags + + Thrown when fails to make API call + Task of ApiResponse (TagsQueryResult) + + + + Find all tags specified by attribute value Find all tags by attributes id, name or matchingname and filter value + + Thrown when fails to make API call + The attribute to filter on. One of: id, name, matchingname + The value of the attribute to filter + TagsQueryResult + + + + Find all tags specified by attribute value Find all tags by attributes id, name or matchingname and filter value + + Thrown when fails to make API call + The attribute to filter on. One of: id, name, matchingname + The value of the attribute to filter + ApiResponse of TagsQueryResult + + + + Find all tags specified by attribute value Find all tags by attributes id, name or matchingname and filter value + + Thrown when fails to make API call + The attribute to filter on. One of: id, name, matchingname + The value of the attribute to filter + Task of TagsQueryResult + + + + Find all tags specified by attribute value Find all tags by attributes id, name or matchingname and filter value + + Thrown when fails to make API call + The attribute to filter on. One of: id, name, matchingname + The value of the attribute to filter + Task of ApiResponse (TagsQueryResult) + + + + Find all tags by ids + + Thrown when fails to make API call + (optional) + TagsQueryResult + + + + Find all tags by ids + + Thrown when fails to make API call + (optional) + ApiResponse of TagsQueryResult + + + + Find all tags by ids + + Thrown when fails to make API call + (optional) + Task of TagsQueryResult + + + + Find all tags by ids + + Thrown when fails to make API call + (optional) + Task of ApiResponse (TagsQueryResult) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Get objects with id + + + + + Thrown when fails to make API call + + + + + + Get objects with id + + + + + Thrown when fails to make API call + + ApiResponse of Object(void) + + + + Get thumbnails with id + + + + + Thrown when fails to make API call + + + + + + Get thumbnails with id + + + + + Thrown when fails to make API call + + ApiResponse of Object(void) + + + + Get objects with id + + + + + Thrown when fails to make API call + + Task of void + + + + Get objects with id + + + + + Thrown when fails to make API call + + Task of ApiResponse + + + + Get thumbnails with id + + + + + Thrown when fails to make API call + + Task of void + + + + Get thumbnails with id + + + + + Thrown when fails to make API call + + Task of ApiResponse + + + + Represents a collection of functions to interact with the API endpoints + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + + + + + + Initializes a new instance of the class + using Configuration object + + An instance of Configuration + + + + + Gets the base path of the API client. + + The base path + + + + Sets the base path of the API client. + + The base path + + + + Gets or sets the configuration object + + An instance of the Configuration + + + + Provides a factory method hook for the creation of exceptions. + + + + + Gets the default header. + + Dictionary of HTTP header + + + + Add default header. + + Header field name. + Header field value. + + + + + Get objects with id + + Thrown when fails to make API call + + + + + + Get objects with id + + Thrown when fails to make API call + + ApiResponse of Object(void) + + + + Get objects with id + + Thrown when fails to make API call + + Task of void + + + + Get objects with id + + Thrown when fails to make API call + + Task of ApiResponse + + + + Get thumbnails with id + + Thrown when fails to make API call + + + + + + Get thumbnails with id + + Thrown when fails to make API call + + ApiResponse of Object(void) + + + + Get thumbnails with id + + Thrown when fails to make API call + + Task of void + + + + Get thumbnails with id + + Thrown when fails to make API call + + Task of ApiResponse + + + + Represents a collection of functions to interact with the API endpoints + + + + + End the active extraction session + + + CAUTION. Untested + + Thrown when fails to make API call + SessionState + + + + End the active extraction session + + + CAUTION. Untested + + Thrown when fails to make API call + ApiResponse of SessionState + + + + End the session for given id + + + Ends the session for the given id + + Thrown when fails to make API call + The id of the session to end + SessionState + + + + End the session for given id + + + Ends the session for the given id + + Thrown when fails to make API call + The id of the session to end + ApiResponse of SessionState + + + + Extract new item + + + TODO + + Thrown when fails to make API call + (optional) + SessionState + + + + Extract new item + + + TODO + + Thrown when fails to make API call + (optional) + ApiResponse of SessionState + + + + Start extraction session + + + Changes the session's state to extraction + + Thrown when fails to make API call + SessionState + + + + Start extraction session + + + Changes the session's state to extraction + + Thrown when fails to make API call + ApiResponse of SessionState + + + + Start new session for given credentials + + + + + Thrown when fails to make API call + (optional) + SessionState + + + + Start new session for given credentials + + + + + Thrown when fails to make API call + (optional) + ApiResponse of SessionState + + + + Validates the session with given id + + + + + Thrown when fails to make API call + The id to validate the session of + SessionState + + + + Validates the session with given id + + + + + Thrown when fails to make API call + The id to validate the session of + ApiResponse of SessionState + + + + End the active extraction session + + + CAUTION. Untested + + Thrown when fails to make API call + Task of SessionState + + + + End the active extraction session + + + CAUTION. Untested + + Thrown when fails to make API call + Task of ApiResponse (SessionState) + + + + End the session for given id + + + Ends the session for the given id + + Thrown when fails to make API call + The id of the session to end + Task of SessionState + + + + End the session for given id + + + Ends the session for the given id + + Thrown when fails to make API call + The id of the session to end + Task of ApiResponse (SessionState) + + + + Extract new item + + + TODO + + Thrown when fails to make API call + (optional) + Task of SessionState + + + + Extract new item + + + TODO + + Thrown when fails to make API call + (optional) + Task of ApiResponse (SessionState) + + + + Start extraction session + + + Changes the session's state to extraction + + Thrown when fails to make API call + Task of SessionState + + + + Start extraction session + + + Changes the session's state to extraction + + Thrown when fails to make API call + Task of ApiResponse (SessionState) + + + + Start new session for given credentials + + + + + Thrown when fails to make API call + (optional) + Task of SessionState + + + + Start new session for given credentials + + + + + Thrown when fails to make API call + (optional) + Task of ApiResponse (SessionState) + + + + Validates the session with given id + + + + + Thrown when fails to make API call + The id to validate the session of + Task of SessionState + + + + Validates the session with given id + + + + + Thrown when fails to make API call + The id to validate the session of + Task of ApiResponse (SessionState) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + + + + + + Initializes a new instance of the class + using Configuration object + + An instance of Configuration + + + + + Gets the base path of the API client. + + The base path + + + + Sets the base path of the API client. + + The base path + + + + Gets or sets the configuration object + + An instance of the Configuration + + + + Provides a factory method hook for the creation of exceptions. + + + + + Gets the default header. + + Dictionary of HTTP header + + + + Add default header. + + Header field name. + Header field value. + + + + + End the active extraction session CAUTION. Untested + + Thrown when fails to make API call + SessionState + + + + End the active extraction session CAUTION. Untested + + Thrown when fails to make API call + ApiResponse of SessionState + + + + End the active extraction session CAUTION. Untested + + Thrown when fails to make API call + Task of SessionState + + + + End the active extraction session CAUTION. Untested + + Thrown when fails to make API call + Task of ApiResponse (SessionState) + + + + End the session for given id Ends the session for the given id + + Thrown when fails to make API call + The id of the session to end + SessionState + + + + End the session for given id Ends the session for the given id + + Thrown when fails to make API call + The id of the session to end + ApiResponse of SessionState + + + + End the session for given id Ends the session for the given id + + Thrown when fails to make API call + The id of the session to end + Task of SessionState + + + + End the session for given id Ends the session for the given id + + Thrown when fails to make API call + The id of the session to end + Task of ApiResponse (SessionState) + + + + Extract new item TODO + + Thrown when fails to make API call + (optional) + SessionState + + + + Extract new item TODO + + Thrown when fails to make API call + (optional) + ApiResponse of SessionState + + + + Extract new item TODO + + Thrown when fails to make API call + (optional) + Task of SessionState + + + + Extract new item TODO + + Thrown when fails to make API call + (optional) + Task of ApiResponse (SessionState) + + + + Start extraction session Changes the session's state to extraction + + Thrown when fails to make API call + SessionState + + + + Start extraction session Changes the session's state to extraction + + Thrown when fails to make API call + ApiResponse of SessionState + + + + Start extraction session Changes the session's state to extraction + + Thrown when fails to make API call + Task of SessionState + + + + Start extraction session Changes the session's state to extraction + + Thrown when fails to make API call + Task of ApiResponse (SessionState) + + + + Start new session for given credentials + + Thrown when fails to make API call + (optional) + SessionState + + + + Start new session for given credentials + + Thrown when fails to make API call + (optional) + ApiResponse of SessionState + + + + Start new session for given credentials + + Thrown when fails to make API call + (optional) + Task of SessionState + + + + Start new session for given credentials + + Thrown when fails to make API call + (optional) + Task of ApiResponse (SessionState) + + + + Validates the session with given id + + Thrown when fails to make API call + The id to validate the session of + SessionState + + + + Validates the session with given id + + Thrown when fails to make API call + The id to validate the session of + ApiResponse of SessionState + + + + Validates the session with given id + + Thrown when fails to make API call + The id to validate the session of + Task of SessionState + + + + Validates the session with given id + + Thrown when fails to make API call + The id to validate the session of + Task of ApiResponse (SessionState) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Find metadata for the given object id + + + Find metadata by the given object id + + Thrown when fails to make API call + The object id to find metadata of + MediaObjectMetadataQueryResult + + + + Find metadata for the given object id + + + Find metadata by the given object id + + Thrown when fails to make API call + The object id to find metadata of + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain with given key + + + The description + + Thrown when fails to make API call + The object id + The domain name + Metadata key + MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain with given key + + + The description + + Thrown when fails to make API call + The object id + The domain name + Metadata key + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain + + + Find metadata for specific object id in given domain + + Thrown when fails to make API call + The domain of the metadata to find + The object id of the multimedia object to find metadata for + MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain + + + Find metadata for specific object id in given domain + + Thrown when fails to make API call + The domain of the metadata to find + The object id of the multimedia object to find metadata for + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata in the specified domain for all the given ids + + + Find metadata in the specified domain for all the given ids + + Thrown when fails to make API call + The domain of the metadata to find + (optional) + MediaObjectMetadataQueryResult + + + + Find metadata in the specified domain for all the given ids + + + Find metadata in the specified domain for all the given ids + + Thrown when fails to make API call + The domain of the metadata to find + (optional) + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key + + + Find metadata for a given object id with specified key + + Thrown when fails to make API call + The key of the metadata to find + The object id of for which the metadata should be find + MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key + + + Find metadata for a given object id with specified key + + Thrown when fails to make API call + The key of the metadata to find + The object id of for which the metadata should be find + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key + + + Find metadata with a the speicifed key from the path across all domains and for the provided ids + + Thrown when fails to make API call + The key of the metadata to find + (optional) + MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key + + + Find metadata with a the speicifed key from the path across all domains and for the provided ids + + Thrown when fails to make API call + The key of the metadata to find + (optional) + ApiResponse of MediaObjectMetadataQueryResult + + + + Finds metadata for the given list of object ids + + + Finds metadata for the given list of object ids + + Thrown when fails to make API call + (optional) + MediaObjectMetadataQueryResult + + + + Finds metadata for the given list of object ids + + + Finds metadata for the given list of object ids + + Thrown when fails to make API call + (optional) + ApiResponse of MediaObjectMetadataQueryResult + + + + Find features for the given id + + + Find features by the given id + + Thrown when fails to make API call + The id to find features of + FeaturesAllCategoriesQueryResult + + + + Find features for the given id + + + Find features by the given id + + Thrown when fails to make API call + The id to find features of + ApiResponse of FeaturesAllCategoriesQueryResult + + + + Find metadata for the given segment id + + + Find metadata by the given segment id + + Thrown when fails to make API call + The segment id to find metadata of + MediaSegmentMetadataQueryResult + + + + Find metadata for the given segment id + + + Find metadata by the given segment id + + Thrown when fails to make API call + The segment id to find metadata of + ApiResponse of MediaSegmentMetadataQueryResult + + + + Find tag ids for the given id + + + Find tag ids for the given id + + Thrown when fails to make API call + The id to find tagids of + TagIDsForElementQueryResult + + + + Find tag ids for the given id + + + Find tag ids for the given id + + Thrown when fails to make API call + The id to find tagids of + ApiResponse of TagIDsForElementQueryResult + + + + Find Text for the given id and retrieval category + + + Find Text by the given id and retrieval category + + Thrown when fails to make API call + The id to find text of + The category for which retrieval shall be performed + FeaturesTextCategoryQueryResult + + + + Find Text for the given id and retrieval category + + + Find Text by the given id and retrieval category + + Thrown when fails to make API call + The id to find text of + The category for which retrieval shall be performed + ApiResponse of FeaturesTextCategoryQueryResult + + + + Find metadata for the given object id + + + Find metadata by the given object id + + Thrown when fails to make API call + The object id to find metadata of + Task of MediaObjectMetadataQueryResult + + + + Find metadata for the given object id + + + Find metadata by the given object id + + Thrown when fails to make API call + The object id to find metadata of + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find metadata for specific object id in given domain with given key + + + The description + + Thrown when fails to make API call + The object id + The domain name + Metadata key + Task of MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain with given key + + + The description + + Thrown when fails to make API call + The object id + The domain name + Metadata key + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find metadata for specific object id in given domain + + + Find metadata for specific object id in given domain + + Thrown when fails to make API call + The domain of the metadata to find + The object id of the multimedia object to find metadata for + Task of MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain + + + Find metadata for specific object id in given domain + + Thrown when fails to make API call + The domain of the metadata to find + The object id of the multimedia object to find metadata for + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find metadata in the specified domain for all the given ids + + + Find metadata in the specified domain for all the given ids + + Thrown when fails to make API call + The domain of the metadata to find + (optional) + Task of MediaObjectMetadataQueryResult + + + + Find metadata in the specified domain for all the given ids + + + Find metadata in the specified domain for all the given ids + + Thrown when fails to make API call + The domain of the metadata to find + (optional) + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find metadata for a given object id with specified key + + + Find metadata for a given object id with specified key + + Thrown when fails to make API call + The key of the metadata to find + The object id of for which the metadata should be find + Task of MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key + + + Find metadata for a given object id with specified key + + Thrown when fails to make API call + The key of the metadata to find + The object id of for which the metadata should be find + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find metadata for a given object id with specified key + + + Find metadata with a the speicifed key from the path across all domains and for the provided ids + + Thrown when fails to make API call + The key of the metadata to find + (optional) + Task of MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key + + + Find metadata with a the speicifed key from the path across all domains and for the provided ids + + Thrown when fails to make API call + The key of the metadata to find + (optional) + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Finds metadata for the given list of object ids + + + Finds metadata for the given list of object ids + + Thrown when fails to make API call + (optional) + Task of MediaObjectMetadataQueryResult + + + + Finds metadata for the given list of object ids + + + Finds metadata for the given list of object ids + + Thrown when fails to make API call + (optional) + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find features for the given id + + + Find features by the given id + + Thrown when fails to make API call + The id to find features of + Task of FeaturesAllCategoriesQueryResult + + + + Find features for the given id + + + Find features by the given id + + Thrown when fails to make API call + The id to find features of + Task of ApiResponse (FeaturesAllCategoriesQueryResult) + + + + Find metadata for the given segment id + + + Find metadata by the given segment id + + Thrown when fails to make API call + The segment id to find metadata of + Task of MediaSegmentMetadataQueryResult + + + + Find metadata for the given segment id + + + Find metadata by the given segment id + + Thrown when fails to make API call + The segment id to find metadata of + Task of ApiResponse (MediaSegmentMetadataQueryResult) + + + + Find tag ids for the given id + + + Find tag ids for the given id + + Thrown when fails to make API call + The id to find tagids of + Task of TagIDsForElementQueryResult + + + + Find tag ids for the given id + + + Find tag ids for the given id + + Thrown when fails to make API call + The id to find tagids of + Task of ApiResponse (TagIDsForElementQueryResult) + + + + Find Text for the given id and retrieval category + + + Find Text by the given id and retrieval category + + Thrown when fails to make API call + The id to find text of + The category for which retrieval shall be performed + Task of FeaturesTextCategoryQueryResult + + + + Find Text for the given id and retrieval category + + + Find Text by the given id and retrieval category + + Thrown when fails to make API call + The id to find text of + The category for which retrieval shall be performed + Task of ApiResponse (FeaturesTextCategoryQueryResult) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + + + + + + Initializes a new instance of the class + using Configuration object + + An instance of Configuration + + + + + Gets the base path of the API client. + + The base path + + + + Sets the base path of the API client. + + The base path + + + + Gets or sets the configuration object + + An instance of the Configuration + + + + Provides a factory method hook for the creation of exceptions. + + + + + Gets the default header. + + Dictionary of HTTP header + + + + Add default header. + + Header field name. + Header field value. + + + + + Find metadata for the given object id Find metadata by the given object id + + Thrown when fails to make API call + The object id to find metadata of + MediaObjectMetadataQueryResult + + + + Find metadata for the given object id Find metadata by the given object id + + Thrown when fails to make API call + The object id to find metadata of + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata for the given object id Find metadata by the given object id + + Thrown when fails to make API call + The object id to find metadata of + Task of MediaObjectMetadataQueryResult + + + + Find metadata for the given object id Find metadata by the given object id + + Thrown when fails to make API call + The object id to find metadata of + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find metadata for specific object id in given domain with given key The description + + Thrown when fails to make API call + The object id + The domain name + Metadata key + MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain with given key The description + + Thrown when fails to make API call + The object id + The domain name + Metadata key + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain with given key The description + + Thrown when fails to make API call + The object id + The domain name + Metadata key + Task of MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain with given key The description + + Thrown when fails to make API call + The object id + The domain name + Metadata key + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find metadata for specific object id in given domain Find metadata for specific object id in given domain + + Thrown when fails to make API call + The domain of the metadata to find + The object id of the multimedia object to find metadata for + MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain Find metadata for specific object id in given domain + + Thrown when fails to make API call + The domain of the metadata to find + The object id of the multimedia object to find metadata for + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain Find metadata for specific object id in given domain + + Thrown when fails to make API call + The domain of the metadata to find + The object id of the multimedia object to find metadata for + Task of MediaObjectMetadataQueryResult + + + + Find metadata for specific object id in given domain Find metadata for specific object id in given domain + + Thrown when fails to make API call + The domain of the metadata to find + The object id of the multimedia object to find metadata for + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find metadata in the specified domain for all the given ids Find metadata in the specified domain for all the given ids + + Thrown when fails to make API call + The domain of the metadata to find + (optional) + MediaObjectMetadataQueryResult + + + + Find metadata in the specified domain for all the given ids Find metadata in the specified domain for all the given ids + + Thrown when fails to make API call + The domain of the metadata to find + (optional) + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata in the specified domain for all the given ids Find metadata in the specified domain for all the given ids + + Thrown when fails to make API call + The domain of the metadata to find + (optional) + Task of MediaObjectMetadataQueryResult + + + + Find metadata in the specified domain for all the given ids Find metadata in the specified domain for all the given ids + + Thrown when fails to make API call + The domain of the metadata to find + (optional) + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find metadata for a given object id with specified key Find metadata for a given object id with specified key + + Thrown when fails to make API call + The key of the metadata to find + The object id of for which the metadata should be find + MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key Find metadata for a given object id with specified key + + Thrown when fails to make API call + The key of the metadata to find + The object id of for which the metadata should be find + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key Find metadata for a given object id with specified key + + Thrown when fails to make API call + The key of the metadata to find + The object id of for which the metadata should be find + Task of MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key Find metadata for a given object id with specified key + + Thrown when fails to make API call + The key of the metadata to find + The object id of for which the metadata should be find + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find metadata for a given object id with specified key Find metadata with a the speicifed key from the path across all domains and for the provided ids + + Thrown when fails to make API call + The key of the metadata to find + (optional) + MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key Find metadata with a the speicifed key from the path across all domains and for the provided ids + + Thrown when fails to make API call + The key of the metadata to find + (optional) + ApiResponse of MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key Find metadata with a the speicifed key from the path across all domains and for the provided ids + + Thrown when fails to make API call + The key of the metadata to find + (optional) + Task of MediaObjectMetadataQueryResult + + + + Find metadata for a given object id with specified key Find metadata with a the speicifed key from the path across all domains and for the provided ids + + Thrown when fails to make API call + The key of the metadata to find + (optional) + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Finds metadata for the given list of object ids Finds metadata for the given list of object ids + + Thrown when fails to make API call + (optional) + MediaObjectMetadataQueryResult + + + + Finds metadata for the given list of object ids Finds metadata for the given list of object ids + + Thrown when fails to make API call + (optional) + ApiResponse of MediaObjectMetadataQueryResult + + + + Finds metadata for the given list of object ids Finds metadata for the given list of object ids + + Thrown when fails to make API call + (optional) + Task of MediaObjectMetadataQueryResult + + + + Finds metadata for the given list of object ids Finds metadata for the given list of object ids + + Thrown when fails to make API call + (optional) + Task of ApiResponse (MediaObjectMetadataQueryResult) + + + + Find features for the given id Find features by the given id + + Thrown when fails to make API call + The id to find features of + FeaturesAllCategoriesQueryResult + + + + Find features for the given id Find features by the given id + + Thrown when fails to make API call + The id to find features of + ApiResponse of FeaturesAllCategoriesQueryResult + + + + Find features for the given id Find features by the given id + + Thrown when fails to make API call + The id to find features of + Task of FeaturesAllCategoriesQueryResult + + + + Find features for the given id Find features by the given id + + Thrown when fails to make API call + The id to find features of + Task of ApiResponse (FeaturesAllCategoriesQueryResult) + + + + Find metadata for the given segment id Find metadata by the given segment id + + Thrown when fails to make API call + The segment id to find metadata of + MediaSegmentMetadataQueryResult + + + + Find metadata for the given segment id Find metadata by the given segment id + + Thrown when fails to make API call + The segment id to find metadata of + ApiResponse of MediaSegmentMetadataQueryResult + + + + Find metadata for the given segment id Find metadata by the given segment id + + Thrown when fails to make API call + The segment id to find metadata of + Task of MediaSegmentMetadataQueryResult + + + + Find metadata for the given segment id Find metadata by the given segment id + + Thrown when fails to make API call + The segment id to find metadata of + Task of ApiResponse (MediaSegmentMetadataQueryResult) + + + + Find tag ids for the given id Find tag ids for the given id + + Thrown when fails to make API call + The id to find tagids of + TagIDsForElementQueryResult + + + + Find tag ids for the given id Find tag ids for the given id + + Thrown when fails to make API call + The id to find tagids of + ApiResponse of TagIDsForElementQueryResult + + + + Find tag ids for the given id Find tag ids for the given id + + Thrown when fails to make API call + The id to find tagids of + Task of TagIDsForElementQueryResult + + + + Find tag ids for the given id Find tag ids for the given id + + Thrown when fails to make API call + The id to find tagids of + Task of ApiResponse (TagIDsForElementQueryResult) + + + + Find Text for the given id and retrieval category Find Text by the given id and retrieval category + + Thrown when fails to make API call + The id to find text of + The category for which retrieval shall be performed + FeaturesTextCategoryQueryResult + + + + Find Text for the given id and retrieval category Find Text by the given id and retrieval category + + Thrown when fails to make API call + The id to find text of + The category for which retrieval shall be performed + ApiResponse of FeaturesTextCategoryQueryResult + + + + Find Text for the given id and retrieval category Find Text by the given id and retrieval category + + Thrown when fails to make API call + The id to find text of + The category for which retrieval shall be performed + Task of FeaturesTextCategoryQueryResult + + + + Find Text for the given id and retrieval category Find Text by the given id and retrieval category + + Thrown when fails to make API call + The id to find text of + The category for which retrieval shall be performed + Task of ApiResponse (FeaturesTextCategoryQueryResult) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Find all distinct elements of a given column + + + Find all distinct elements of a given column. Please note that this operation does cache results. + + Thrown when fails to make API call + (optional) + DistinctElementsResult + + + + Find all distinct elements of a given column + + + Find all distinct elements of a given column. Please note that this operation does cache results. + + Thrown when fails to make API call + (optional) + ApiResponse of DistinctElementsResult + + + + Find all distinct elements of a given column + + + Find all distinct elements of a given column. Please note that this operation does cache results. + + Thrown when fails to make API call + (optional) + Task of DistinctElementsResult + + + + Find all distinct elements of a given column + + + Find all distinct elements of a given column. Please note that this operation does cache results. + + Thrown when fails to make API call + (optional) + Task of ApiResponse (DistinctElementsResult) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + + + + + + Initializes a new instance of the class + using Configuration object + + An instance of Configuration + + + + + Gets the base path of the API client. + + The base path + + + + Sets the base path of the API client. + + The base path + + + + Gets or sets the configuration object + + An instance of the Configuration + + + + Provides a factory method hook for the creation of exceptions. + + + + + Gets the default header. + + Dictionary of HTTP header + + + + Add default header. + + Header field name. + Header field value. + + + + + Find all distinct elements of a given column Find all distinct elements of a given column. Please note that this operation does cache results. + + Thrown when fails to make API call + (optional) + DistinctElementsResult + + + + Find all distinct elements of a given column Find all distinct elements of a given column. Please note that this operation does cache results. + + Thrown when fails to make API call + (optional) + ApiResponse of DistinctElementsResult + + + + Find all distinct elements of a given column Find all distinct elements of a given column. Please note that this operation does cache results. + + Thrown when fails to make API call + (optional) + Task of DistinctElementsResult + + + + Find all distinct elements of a given column Find all distinct elements of a given column. Please note that this operation does cache results. + + Thrown when fails to make API call + (optional) + Task of ApiResponse (DistinctElementsResult) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Finds segments for specified id + + + Finds segments for specified id + + Thrown when fails to make API call + The id of the segments + MediaSegmentQueryResult + + + + Finds segments for specified id + + + Finds segments for specified id + + Thrown when fails to make API call + The id of the segments + ApiResponse of MediaSegmentQueryResult + + + + Finds segments for specified ids + + + Finds segments for specified ids + + Thrown when fails to make API call + (optional) + MediaSegmentQueryResult + + + + Finds segments for specified ids + + + Finds segments for specified ids + + Thrown when fails to make API call + (optional) + ApiResponse of MediaSegmentQueryResult + + + + Find segments by their media object's id + + + Find segments by their media object's id + + Thrown when fails to make API call + The id of the media object to find segments fo + MediaSegmentQueryResult + + + + Find segments by their media object's id + + + Find segments by their media object's id + + Thrown when fails to make API call + The id of the media object to find segments fo + ApiResponse of MediaSegmentQueryResult + + + + Finds segments for specified id + + + Finds segments for specified id + + Thrown when fails to make API call + The id of the segments + Task of MediaSegmentQueryResult + + + + Finds segments for specified id + + + Finds segments for specified id + + Thrown when fails to make API call + The id of the segments + Task of ApiResponse (MediaSegmentQueryResult) + + + + Finds segments for specified ids + + + Finds segments for specified ids + + Thrown when fails to make API call + (optional) + Task of MediaSegmentQueryResult + + + + Finds segments for specified ids + + + Finds segments for specified ids + + Thrown when fails to make API call + (optional) + Task of ApiResponse (MediaSegmentQueryResult) + + + + Find segments by their media object's id + + + Find segments by their media object's id + + Thrown when fails to make API call + The id of the media object to find segments fo + Task of MediaSegmentQueryResult + + + + Find segments by their media object's id + + + Find segments by their media object's id + + Thrown when fails to make API call + The id of the media object to find segments fo + Task of ApiResponse (MediaSegmentQueryResult) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + + + + + + Initializes a new instance of the class + using Configuration object + + An instance of Configuration + + + + + Gets the base path of the API client. + + The base path + + + + Sets the base path of the API client. + + The base path + + + + Gets or sets the configuration object + + An instance of the Configuration + + + + Provides a factory method hook for the creation of exceptions. + + + + + Gets the default header. + + Dictionary of HTTP header + + + + Add default header. + + Header field name. + Header field value. + + + + + Finds segments for specified id Finds segments for specified id + + Thrown when fails to make API call + The id of the segments + MediaSegmentQueryResult + + + + Finds segments for specified id Finds segments for specified id + + Thrown when fails to make API call + The id of the segments + ApiResponse of MediaSegmentQueryResult + + + + Finds segments for specified id Finds segments for specified id + + Thrown when fails to make API call + The id of the segments + Task of MediaSegmentQueryResult + + + + Finds segments for specified id Finds segments for specified id + + Thrown when fails to make API call + The id of the segments + Task of ApiResponse (MediaSegmentQueryResult) + + + + Finds segments for specified ids Finds segments for specified ids + + Thrown when fails to make API call + (optional) + MediaSegmentQueryResult + + + + Finds segments for specified ids Finds segments for specified ids + + Thrown when fails to make API call + (optional) + ApiResponse of MediaSegmentQueryResult + + + + Finds segments for specified ids Finds segments for specified ids + + Thrown when fails to make API call + (optional) + Task of MediaSegmentQueryResult + + + + Finds segments for specified ids Finds segments for specified ids + + Thrown when fails to make API call + (optional) + Task of ApiResponse (MediaSegmentQueryResult) + + + + Find segments by their media object's id Find segments by their media object's id + + Thrown when fails to make API call + The id of the media object to find segments fo + MediaSegmentQueryResult + + + + Find segments by their media object's id Find segments by their media object's id + + Thrown when fails to make API call + The id of the media object to find segments fo + ApiResponse of MediaSegmentQueryResult + + + + Find segments by their media object's id Find segments by their media object's id + + Thrown when fails to make API call + The id of the media object to find segments fo + Task of MediaSegmentQueryResult + + + + Find segments by their media object's id Find segments by their media object's id + + Thrown when fails to make API call + The id of the media object to find segments fo + Task of ApiResponse (MediaSegmentQueryResult) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Find similar segments based on the given query + + + Performs a similarity search based on the formulated query + + Thrown when fails to make API call + (optional) + SimilarityQueryResultBatch + + + + Find similar segments based on the given query + + + Performs a similarity search based on the formulated query + + Thrown when fails to make API call + (optional) + ApiResponse of SimilarityQueryResultBatch + + + + Find similar segments based on the given query + + + Performs a similarity search based on the formulated query + + Thrown when fails to make API call + (optional) + Task of SimilarityQueryResultBatch + + + + Find similar segments based on the given query + + + Performs a similarity search based on the formulated query + + Thrown when fails to make API call + (optional) + Task of ApiResponse (SimilarityQueryResultBatch) + + + + Represents a collection of functions to interact with the API endpoints + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + + + + + + Initializes a new instance of the class + using Configuration object + + An instance of Configuration + + + + + Gets the base path of the API client. + + The base path + + + + Sets the base path of the API client. + + The base path + + + + Gets or sets the configuration object + + An instance of the Configuration + + + + Provides a factory method hook for the creation of exceptions. + + + + + Gets the default header. + + Dictionary of HTTP header + + + + Add default header. + + Header field name. + Header field value. + + + + + Find similar segments based on the given query Performs a similarity search based on the formulated query + + Thrown when fails to make API call + (optional) + SimilarityQueryResultBatch + + + + Find similar segments based on the given query Performs a similarity search based on the formulated query + + Thrown when fails to make API call + (optional) + ApiResponse of SimilarityQueryResultBatch + + + + Find similar segments based on the given query Performs a similarity search based on the formulated query + + Thrown when fails to make API call + (optional) + Task of SimilarityQueryResultBatch + + + + Find similar segments based on the given query Performs a similarity search based on the formulated query + + Thrown when fails to make API call + (optional) + Task of ApiResponse (SimilarityQueryResultBatch) + + + + API client is mainly responsible for making the HTTP call to the API backend. + + + + + Allows for extending request processing for generated code. + + The RestSharp request object + + + + Allows for extending response processing for generated code. + + The RestSharp request object + The RestSharp response object + + + + Initializes a new instance of the class + with default configuration. + + + + + Initializes a new instance of the class + with default base path (http://localhost:4567). + + An instance of Configuration. + + + + Initializes a new instance of the class + with default configuration. + + The base path. + + + + Gets or sets the default API client for making HTTP calls. + + The default API client. + + + + Gets or sets an instance of the IReadableConfiguration. + + An instance of the IReadableConfiguration. + + helps us to avoid modifying possibly global + configuration values from within a given client. It does not guarantee thread-safety + of the instance in any way. + + + + + Gets or sets the RestClient. + + An instance of the RestClient + + + + Makes the HTTP request (Sync). + + URL path. + HTTP method. + Query parameters. + HTTP body (POST request). + Header parameters. + Form parameters. + File parameters. + Path parameters. + Content Type of the request + Object + + + + Makes the asynchronous HTTP request. + + URL path. + HTTP method. + Query parameters. + HTTP body (POST request). + Header parameters. + Form parameters. + File parameters. + Path parameters. + Content type. + The Task instance. + + + + Escape string (url-encoded). + + String to be escaped. + Escaped string. + + + + Create FileParameter based on Stream. + + Parameter name. + Input stream. + FileParameter. + + + + If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + If parameter is a list, join the list with ",". + Otherwise just return the string. + + The parameter (header, path, query, form). + Formatted string. + + + + Deserialize the JSON string into a proper object. + + The HTTP response. + Object type. + Object representation of the JSON string. + + + + Serialize an input (model) into JSON string + + Object. + JSON string. + + + + Check if the given MIME is a JSON MIME. + JSON MIME examples: + application/json + application/json; charset=UTF8 + APPLICATION/JSON + application/vnd.company+json + + MIME + Returns True if MIME type is json. + + + + Select the Content-Type header's value from the given content-type array: + if JSON type exists in the given array, use it; + otherwise use the first one defined in 'consumes' + + The Content-Type array to select from. + The Content-Type header to use. + + + + Select the Accept header's value from the given accepts array: + if JSON exists in the given array, use it; + otherwise use all of them (joining into a string) + + The accepts array to select from. + The Accept header to use. + + + + Encode string in base64 format. + + String to be encoded. + Encoded string. + + + + Dynamically cast the object into target type. + + Object to be casted + Target type + Casted object + + + + Convert stream to byte array + + Input stream to be converted + Byte array + + + + URL encode a string + Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + + String to be URL encoded + Byte array + + + + Sanitize filename by removing the path + + Filename + Filename + + + + Convert params to key/value pairs. + Use collectionFormat to properly format lists and collections. + + Collection format. + Key name. + Value object. + A list of KeyValuePairs + + + + Check if generic object is a collection. + + + True if object is a collection type + + + + Represents a readable-only configuration contract. + + + + + Gets the access token. + + Access token. + + + + Gets the API key. + + API key. + + + + Gets the API key prefix. + + API key prefix. + + + + Gets the base path. + + Base path. + + + + Gets the date time format. + + Date time foramt. + + + + Gets the default header. + + Default header. + + + + Gets the temp folder path. + + Temp folder path. + + + + Gets the HTTP connection timeout (in milliseconds) + + HTTP connection timeout. + + + + Gets the user agent. + + User agent. + + + + Gets the username. + + Username. + + + + Gets the password. + + Password. + + + + Gets the API key with prefix. + + API key identifier (authentication scheme). + API key with prefix. + + + + API Response + + + + + Gets or sets the status code (HTTP status code) + + The status code. + + + + Gets or sets the HTTP headers + + HTTP headers + + + + Gets or sets the data (parsed HTTP body) + + The data. + + + + Initializes a new instance of the class. + + HTTP status code. + HTTP headers. + Data (parsed HTTP body) + + + + Represents a set of configuration settings + + + + + Version of the package. + + Version of the package. + + + + Identifier for ISO 8601 DateTime Format + + See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. + + + + Default creation of exceptions for a given method name and response object + + + + + Gets or sets the default Configuration. + + Configuration. + + + + Gets or sets the API key based on the authentication name. + + The API key. + + + + Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + + The prefix of the API key. + + + + Initializes a new instance of the class + + + + + Initializes a new instance of the class + + + + + Initializes a new instance of the class with different settings + + Api client + Dictionary of default HTTP header + Username + Password + accessToken + Dictionary of API key + Dictionary of API key prefix + Temp folder path + DateTime format string + HTTP connection timeout (in milliseconds) + HTTP user agent + + + + Initializes a new instance of the Configuration class. + + Api client. + + + + Gets an instance of an ApiClient for this configuration + + + + + Gets or sets the base path for API access. + + + + + Gets or sets the default header. + + + + + Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + + + + + Gets or sets the HTTP user agent. + + Http user agent. + + + + Gets or sets the username (HTTP basic authentication). + + The username. + + + + Gets or sets the password (HTTP basic authentication). + + The password. + + + + Gets the API key with prefix. + + API key identifier (authentication scheme). + API key with prefix. + + + + Gets or sets the access token for OAuth2 authentication. + + The access token. + + + + Gets or sets the temporary folder path to store the files downloaded from the server. + + Folder path. + + + + Gets or sets the date time format used when serializing in the ApiClient + By default, it's set to ISO 8601 - "o", for others see: + https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + No validation is done to ensure that the string you're providing is valid + + The DateTimeFormat string + + + + Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + + The prefix of the API key. + + + + Gets or sets the API key based on the authentication name. + + The API key. + + + + Add default header. + + Header field name. + Header field value. + + + + + Creates a new based on this instance. + + + + + + Returns a string with essential information for debugging. + + + + + Add Api Key Header. + + Api Key name. + Api Key value. + + + + + Sets the API key prefix. + + Api Key name. + Api Key value. + + + + API Exception + + + + + Gets or sets the error code (HTTP status code) + + The error code (HTTP status code). + + + + Gets or sets the error content (body json object) + + The error content (Http response body). + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + HTTP status code. + Error message. + + + + Initializes a new instance of the class. + + HTTP status code. + Error message. + Error content. + + + + Represents configuration aspects required to interact with the API endpoints. + + + + + Gets or sets the configuration object + + An instance of the Configuration + + + + Gets the base path of the API client. + + The base path + + + + Provides a factory method hook for the creation of exceptions. + + + + + provides a compile-time extension point for globally configuring + API Clients. + + + A customized implementation via partial class may reside in another file and may + be excluded from automatic generation via a .openapi-generator-ignore file. + + + + + Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + + + + + Initializes a new instance of the class. + + + + + A delegate to ExceptionFactory method + + Method name + Response + Exceptions + + + diff --git a/Assets/cineast.json.meta b/Runtime/Libs/Org.Vitrivr.CineastApi.xml.meta similarity index 75% rename from Assets/cineast.json.meta rename to Runtime/Libs/Org.Vitrivr.CineastApi.xml.meta index fd02290..f995819 100644 --- a/Assets/cineast.json.meta +++ b/Runtime/Libs/Org.Vitrivr.CineastApi.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6091c79ae573ab14abdd06f71c993f13 +guid: 14ae7084d81024705a81c7ee91b46ffc TextScriptImporter: externalObjects: {} userData: diff --git a/Runtime/Libs/RestSharp.Cineast.dll b/Runtime/Libs/RestSharp.Cineast.dll new file mode 100755 index 0000000..59d82f9 Binary files /dev/null and b/Runtime/Libs/RestSharp.Cineast.dll differ diff --git a/Runtime/Libs/RestSharp.Cineast.dll.meta b/Runtime/Libs/RestSharp.Cineast.dll.meta new file mode 100644 index 0000000..c2217ca --- /dev/null +++ b/Runtime/Libs/RestSharp.Cineast.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: b5a3216cc99fd4a3aa131d38e4281cce +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Libs/link.xml b/Runtime/Libs/link.xml new file mode 100644 index 0000000..2392ca0 --- /dev/null +++ b/Runtime/Libs/link.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/Libs/link.xml.meta b/Runtime/Libs/link.xml.meta new file mode 100644 index 0000000..2fc4165 --- /dev/null +++ b/Runtime/Libs/link.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b5989486aa88f4016bebd2f9b36ec606 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr.UnityInterface.CineastApi.asmdef b/Runtime/Vitrivr.UnityInterface.CineastApi.asmdef similarity index 100% rename from Assets/CineastUnityInterface/Runtime/Vitrivr.UnityInterface.CineastApi.asmdef rename to Runtime/Vitrivr.UnityInterface.CineastApi.asmdef diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr.UnityInterface.CineastApi.asmdef.meta b/Runtime/Vitrivr.UnityInterface.CineastApi.asmdef.meta similarity index 100% rename from Assets/CineastUnityInterface/Runtime/Vitrivr.UnityInterface.CineastApi.asmdef.meta rename to Runtime/Vitrivr.UnityInterface.CineastApi.asmdef.meta diff --git a/Assets/CineastUnityInterface/Tests.meta b/Runtime/Vitrivr.meta similarity index 77% rename from Assets/CineastUnityInterface/Tests.meta rename to Runtime/Vitrivr.meta index 6d59b92..94eff02 100644 --- a/Assets/CineastUnityInterface/Tests.meta +++ b/Runtime/Vitrivr.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5b172e1057a1d61458f8638feb4ec4a7 +guid: b600b578d33b43c2b9770e3848a46228 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/CineastUnityInterface/Tests/Editor.meta b/Runtime/Vitrivr/UnityInterface.meta similarity index 77% rename from Assets/CineastUnityInterface/Tests/Editor.meta rename to Runtime/Vitrivr/UnityInterface.meta index be5af52..a07773d 100644 --- a/Assets/CineastUnityInterface/Tests/Editor.meta +++ b/Runtime/Vitrivr/UnityInterface.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1cb655accfce7d7479f3960b239acd3f +guid: 194b9dea711c49d685d7caab9b7eb057 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/CineastUnityInterface/Editor.meta b/Runtime/Vitrivr/UnityInterface/CineastApi.meta similarity index 77% rename from Assets/CineastUnityInterface/Editor.meta rename to Runtime/Vitrivr/UnityInterface/CineastApi.meta index 54d91b6..ec36e71 100644 --- a/Assets/CineastUnityInterface/Editor.meta +++ b/Runtime/Vitrivr/UnityInterface/CineastApi.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d4cb3ee958eedac40aff725c2a90af01 +guid: 45914c57d5214e1f9d11c984ab30dc93 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/CineastWrapper.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/CineastWrapper.cs new file mode 100644 index 0000000..bcc82a5 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/CineastWrapper.cs @@ -0,0 +1,147 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Org.Vitrivr.CineastApi.Api; +using Org.Vitrivr.CineastApi.Model; +using UnityEngine; +using Vitrivr.UnityInterface.CineastApi.Model.Config; +using Vitrivr.UnityInterface.CineastApi.Model.Data; +using Vitrivr.UnityInterface.CineastApi.Utils; + +namespace Vitrivr.UnityInterface.CineastApi +{ + /// + /// Wrapper for cineast + /// + public class CineastWrapper : MonoBehaviour + { + public static readonly ObjectApi ObjectApi = new ObjectApi(CineastConfigManager.Instance.ApiConfiguration); + public static readonly SegmentsApi SegmentsApi = new SegmentsApi(CineastConfigManager.Instance.ApiConfiguration); + public static readonly SegmentApi SegmentApi = new SegmentApi(CineastConfigManager.Instance.ApiConfiguration); + public static readonly TagApi TagApi = new TagApi(CineastConfigManager.Instance.ApiConfiguration); + public static readonly MetadataApi MetadataApi = new MetadataApi(CineastConfigManager.Instance.ApiConfiguration); + public static readonly MiscApi MiscApi = new MiscApi(CineastConfigManager.Instance.ApiConfiguration); + + public static readonly CineastConfig CineastConfig = CineastConfigManager.Instance.Config; + + public bool QueryRunning { get; private set; } + + /// + /// Executes a , reduces the result set to the specified number of maximum results and + /// prefetches data for the given number of segments. + /// + /// Query to execute + /// Maximum number of results to retain + /// Number of segments to prefetch data for + /// for the query including the result list + public static async Task ExecuteQuery(SimilarityQuery query, int maxResults, int prefetch) + { + var queryResults = await Task.Run(() => SegmentsApi.FindSegmentSimilar(query)); + + var querySegments = ResultUtils.ToSegmentData(queryResults, maxResults); + + var queryData = new QueryResponse(query, querySegments); + if (prefetch > 0) + { + await queryData.Prefetch(prefetch); + } + + return queryData; + } + + /// + /// Retrieves the unordered list of tags with names matching get given name. + /// + /// Name or partial name of the tags of interest + /// List of objects matching the given name + public static async Task> GetMatchingTags(string name) + { + var result = await Task.Run(() => TagApi.FindTagsBy("matchingname", name)); + + return result.Tags; + } + + public async Task RequestThreaded(SimilarityQuery query) + { + if (QueryRunning) + { + return null; + } + + QueryRunning = true; + var result = await Task.Run(() => SegmentsApi.FindSegmentSimilar(query)); + QueryRunning = false; + return result; + } + + /// + /// Retrieves the distinct values of a specific Boolean query table and column. + /// + /// Table name + /// Column name + /// List of distinct values occuring in the specified column of the specified table + public static async Task> GetDistinctTableValues(string table, string column) + { + var columnSpec = new ColumnSpecification(column, table); + var results = await Task.Run(() => MiscApi.FindDistinctElementsByColumn(columnSpec)); + return results.DistinctElements; + } + + /// + /// Returns the URL to the Thumbnail of the given segment data. Needs to be registered and loaded previously! + /// + /// Segment to get thumbnail URL of. + /// Thumbnail URL of the segment. + public static string GetThumbnailUrlOf(SegmentData segment) + { + return GetThumbnailUrlOfAsync(segment).Result; + } + + /// + /// Returns the URL to the Thumbnail of the given segment data asynchronously. + /// + /// Segment to get thumbnail URL of. + /// Thumbnail URL of the segment. + public static async Task GetThumbnailUrlOfAsync(SegmentData segment) + { + if (CineastConfig.cineastServesMedia) + { + return PathResolver.CombineUrl(CineastConfig.cineastHost, $"/thumbnails/{segment.Id}"); + } + + var objectId = await segment.GetObjectId(); + var path = PathResolver.ResolvePath(CineastConfig.thumbnailPath, objectId, segment.Id); + return PathResolver.CombineUrl(CineastConfig.mediaHost, path + CineastConfig.thumbnailExtension); + } + + /// + /// Returns the URL to the media of the given object data. Needs to be registered and loaded previously! + /// + /// Media object to get URL of. + /// URL of this media object file. + public static string GetMediaUrlOf(ObjectData obj) + { + return GetMediaUrlOfAsync(obj).Result; + } + + /// + /// Returns the URL to the media of the given object data asynchronously. + /// + /// Media object to get URL of. + /// Optional segment ID to support legacy use cases. + /// URL of this media object file. + public static async Task GetMediaUrlOfAsync(ObjectData obj, string segmentId = null) + { + if (CineastConfig.cineastServesMedia) + { + return PathResolver.CombineUrl(CineastConfig.cineastHost, $"/objects/{obj.Id}"); + } + + var objectPath = await obj.GetPath(); + var objectName = await obj.GetName(); + var mediaType = await obj.GetMediaType(); + var path = PathResolver.ResolvePath(CineastConfig.mediaPath, obj.Id, segmentId, objectName, objectPath, + mediaType.ToString()); + return PathResolver.CombineUrl(CineastConfig.mediaHost, path); + } + } +} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/ObjectQuery.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/CineastWrapper.cs.meta similarity index 69% rename from Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/ObjectQuery.cs.meta rename to Runtime/Vitrivr/UnityInterface/CineastApi/CineastWrapper.cs.meta index 1c2678a..b9fb2b1 100644 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/ObjectQuery.cs.meta +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/CineastWrapper.cs.meta @@ -1,8 +1,7 @@ fileFormatVersion: 2 -guid: 028596801c7aaa845bf198f62a230b2c -timeCreated: 1496757665 -licenseType: Free +guid: 99be9a66d4d2408d8041996cb354c4ef MonoImporter: + externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model.meta new file mode 100644 index 0000000..5e293b5 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7360adaed92d4cb9ba481aaa6f601b72 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config.meta new file mode 100644 index 0000000..e0aab41 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 97952b5c3dea45d2ad069f8f60a8d50f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CategoryMappings.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CategoryMappings.cs new file mode 100644 index 0000000..ebdc1a7 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CategoryMappings.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; + +namespace Vitrivr.UnityInterface.CineastApi.Model.Config +{ + + /// + /// Holds mappings to the required Cineast categories + /// + [Serializable] + public class CategoryMappings + { + + public const string SPATIAL_CATEGORY = "spatialdistance"; + public const string TEMPORAL_CATEGORY = "temporaldistance"; + public const string SPATIOTEMPORAL_CATEGORY = "spatiotemporal"; + + public const string GLOBAL_COLOR_CATEGORY = "globalcolor"; + public const string EDGE_CATEGORY = "edge"; + + public const string TAGS_CATEGORY = "tags"; + + /// + /// The mappings. This class provides *_NAME as mapping name and + /// the result should be used as categories. + /// + public Dictionary mapping = new Dictionary(); + + public CategoryMappings() + { + + } + + + + + /// + /// Returns the default mappings. + /// They are as follows: + ///
    + ///
  • spatialdistance maps to spatialdistance
  • + ///
  • temporaldistance maps to temporaldistance
  • + ///
  • spatiotemporal maps to spatiotemporal
  • + ///
  • globalcolor maps to globalcolor
  • + ///
  • edge maps to edge
  • + ///
+ ///
+ /// + public static CategoryMappings GetDefault() + { + var m = new CategoryMappings(); + m.mapping.Add(SPATIAL_CATEGORY, SPATIAL_CATEGORY); + m.mapping.Add(TEMPORAL_CATEGORY, TEMPORAL_CATEGORY); + m.mapping.Add(SPATIOTEMPORAL_CATEGORY, SPATIOTEMPORAL_CATEGORY); + m.mapping.Add(GLOBAL_COLOR_CATEGORY, GLOBAL_COLOR_CATEGORY); + m.mapping.Add(EDGE_CATEGORY, EDGE_CATEGORY); + m.mapping.Add(TAGS_CATEGORY, TAGS_CATEGORY); + return m; + } + + } +} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/CineastApi.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CategoryMappings.cs.meta similarity index 69% rename from Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/CineastApi.cs.meta rename to Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CategoryMappings.cs.meta index 37328a2..d51a872 100644 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/CineastApi.cs.meta +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CategoryMappings.cs.meta @@ -1,8 +1,7 @@ fileFormatVersion: 2 -guid: 122f2174bafde3a468a42914641f63fa -timeCreated: 1498062395 -licenseType: Free +guid: 9f5b23a9f95a40b7b29446235e408412 MonoImporter: + externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CineastConfig.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CineastConfig.cs new file mode 100644 index 0000000..bf02c63 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CineastConfig.cs @@ -0,0 +1,104 @@ +using System; + +namespace Vitrivr.UnityInterface.CineastApi.Model.Config +{ + [Serializable] + public class CineastConfig + { + + /// + /// The host address of cineast. + /// Defaults to http://localhost:4567/ + /// + public string cineastHost; + /// + /// The host address for media items. + /// Defaults to http://localhost/ + /// + public string mediaHost; + + /// + /// If true, cineast is expected to serve the media as "thumbnails/:s" and "objects/:o", hence we'll try to load them from there + /// + public bool cineastServesMedia; + + /// + /// The path to thumbnail files. + /// Defaults to "thumbnails/:o/:s" + /// + public string thumbnailPath; + /// + /// The thumbnail file extension. + /// Defaults to ".jpg" + /// + public string thumbnailExtension; + /// + /// The path to original media files. + /// Defaults to "collection/:p" + /// + public string mediaPath; + + /// + /// The category names mapped to known names. + /// Usually this can be left to default. + /// + public CategoryMappings categoryMappings; + + public CineastConfig() + { + // empty constructor + } + + public CineastConfig( + string cineastHost, + string mediaHost, + string thumbnailPath, + string thumbnailExtension, + string mediaPath) + { + this.cineastHost = SanitizeHost(cineastHost); + this.mediaHost = SanitizeHost(mediaHost); + this.thumbnailPath = thumbnailPath; + this.thumbnailExtension = thumbnailExtension; + this.mediaPath = mediaPath; + categoryMappings = CategoryMappings.GetDefault(); + } + + public bool IsEmpty() + { + return string.IsNullOrEmpty(cineastHost) || string.IsNullOrEmpty(mediaHost); + } + + /// + /// Ensures that the host starts with "http://" and ends with "/" + /// + /// The host address to sanitize + /// + private string SanitizeHost(string host) + { + if (!string.IsNullOrEmpty(host) && !host.StartsWith("http://")) + { + host = "http://" + host; + } + + if (!host.EndsWith("/")) + { + host += "/"; + } + return host; + } + + public static CineastConfig GetDefault() + { + return new CineastConfig("http://localhost:4567/", "http://localhost/", "thumbnails/:o/:s", ".jpg", "collection/:p"); + } + + public void SanitizeCategories() + { + if (categoryMappings.mapping.Count == 0) + { + categoryMappings = CategoryMappings.GetDefault(); + } + } + } +} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/IdsQuery.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CineastConfig.cs.meta similarity index 69% rename from Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/IdsQuery.cs.meta rename to Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CineastConfig.cs.meta index 57bf481..de48340 100644 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/IdsQuery.cs.meta +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Config/CineastConfig.cs.meta @@ -1,8 +1,7 @@ fileFormatVersion: 2 -guid: 9e25eb8930563614f99d9701faee6059 -timeCreated: 1496757666 -licenseType: Free +guid: a2bc78dce7564b8ea8bfc7fc7af88c46 MonoImporter: + externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data.meta new file mode 100644 index 0000000..75c843b --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f050cc834e944fb786fe679101d8c73 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/MetadataStore.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/MetadataStore.cs new file mode 100644 index 0000000..53dca6f --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/MetadataStore.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Org.Vitrivr.CineastApi.Model; +using UnityEngine; + +namespace Vitrivr.UnityInterface.CineastApi.Model.Data +{ + /// + /// Access and local representation of metadata + /// + [Serializable] + public class MetadataStore + { + public MetadataStore(string id) + { + ObjectId = id; + Initialized = false; + } + + /// + /// Actual internal storage of metadata + /// + private Dictionary> _storage = + new Dictionary>(); + + public string ObjectId { get; private set; } + + public bool Initialized { get; private set; } + + public void Initialize(MediaObjectMetadataQueryResult data) + { + if (Initialized) + { + Debug.LogWarning("Attempt to init already init'ed metadata container using cache data"); + return; + } + + foreach (var meta in data.Content.Where(meta => meta.ObjectId == ObjectId)) + { + if (!DomainExists(meta.Domain)) + { + _storage.Add(meta.Domain, new Dictionary()); + } + + var domain = _storage[meta.Domain]; + domain.Add(meta.Key, meta.Value); + } + + Initialized = true; + } + + public async Task InitializeAsync() + { + if (Initialized) + { + Debug.LogWarning($"Attempted to initialize already initialized metadata for media object {ObjectId}!"); + return; + } + + var metadataResult = await CineastWrapper.MetadataApi.FindMetaByIdAsync(ObjectId); + if (!Initialized) + { + Initialize(metadataResult); + } + } + + public async Task>> GetAll() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _storage; + } + + public bool DomainExists(string domain) + { + return _storage.ContainsKey(domain); + } + + public string Get(string domain, string key) + { + return _storage[domain][key]; + } + + /// + /// Retrieves a metadata value using the DOMAIN.KEY notation + /// + /// + /// + public string Get(string str) + { + var domainAndKey = str.Split('.'); + if (domainAndKey.Length >= 1) + { + return _storage[domainAndKey[0]][domainAndKey[1]]; + } + + throw new ArgumentException("Cannot retrieve without domain"); + } + + public List<(string Key, string Value)> GetDomain(string domain) + { + var items = _storage[domain]; + return items.Keys.Select(key => (key, items[key])).ToList(); + } + + public bool Exists(string domain, string key) + { + return DomainExists(domain) && _storage[domain].ContainsKey(key); + } + } +} \ No newline at end of file diff --git a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/SimilarQuery.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/MetadataStore.cs.meta similarity index 69% rename from Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/SimilarQuery.cs.meta rename to Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/MetadataStore.cs.meta index 2c6e793..fac1e23 100644 --- a/Assets/CineastUnityInterface/Runtime/Vitrivr/UnityInterface/CineastApi/Models/Messages/Query/SimilarQuery.cs.meta +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/MetadataStore.cs.meta @@ -1,8 +1,7 @@ fileFormatVersion: 2 -guid: da6c04d988584ee48a4186b9439f6cd1 -timeCreated: 1496757666 -licenseType: Free +guid: 51316df1894e44fa94b77c857f7cd774 MonoImporter: + externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ObjectData.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ObjectData.cs new file mode 100644 index 0000000..0ce3c0b --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ObjectData.cs @@ -0,0 +1,240 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Org.Vitrivr.CineastApi.Model; +using UnityEngine; +using Vitrivr.UnityInterface.CineastApi.Model.Registries; + +namespace Vitrivr.UnityInterface.CineastApi.Model.Data +{ + /// + /// Wrapper object for , a specific media object. + /// + [Serializable] + public class ObjectData + { + private static readonly SemaphoreSlim InitLock = new SemaphoreSlim(1, 1); + + /// + /// ObjectId uniquely identifying the corresponding media object. + /// + private readonly string _id; + + /// + /// The actual multimedia object. + /// + private MediaObjectDescriptor _descriptor; + + /// + /// The Segments contained in this Media Object. + /// + private List _segments; + + /// + /// Constructs a new instance with the given id, for lazy loading. + /// + /// + public ObjectData(string id) + { + _id = id; + Metadata = new MetadataStore(_id); + } + + /// + /// Constructs a new instance with the given wrapper content. + /// + /// + public ObjectData(MediaObjectDescriptor descriptor) + { + _id = descriptor.ObjectId; + Metadata = new MetadataStore(_id); + Initialize(descriptor); + } + + /// + /// Private flag whether actual data is available or not + /// + public bool Initialized { get; private set; } + + public MetadataStore Metadata { get; private set; } + + /// + /// ID of this object's + /// + public string Id => Initialized ? _descriptor.ObjectId : _id; + + /// + /// Async (lazy loading) call to fill wrapper with content + /// + private async Task InitializeAsync(bool withMetadata = true) + { + await InitLock.WaitAsync(); + try + { + if (Initialized) + { + Debug.LogWarning($"Attempt to init already init'ed object with id \"{Id}\". Using cached data."); + return; + } + + var result = await CineastWrapper.ObjectApi.FindObjectsByAttributeAsync("id", _id); + + if (result.Content.Count != 1) + { + Debug.LogError($"Did not retrieve MediaObjectDescriptor for id {_id}"); + } + else + { + Initialize(result.Content[0]); + } + + if (withMetadata) + { + await Metadata.InitializeAsync(); + } + } + finally + { + InitLock.Release(); + } + } + + /// + /// Initialises this media object with the given descriptor. + /// + /// + public void Initialize(MediaObjectDescriptor descriptor) + { + if (Initialized) + { + Debug.LogWarning($"Attempt to init already init'ed object with id \"{Id}\". Using cached data."); + return; + } + + if (descriptor.ObjectId != _id) + { + Debug.LogError($"Attempt to init failed. This id ({_id}) and descriptor's {descriptor.ObjectId} do not match."); + return; + } + + _descriptor = descriptor; + Initialized = true; + } + + public void InitializeMeta(MediaObjectMetadataQueryResult meta) + { + if (Metadata.Initialized) + { + Debug.LogWarning("Attempt to initialize already initialized object metadata for media object with id " + + $"\"{Id}\". Using cached data."); + return; + } + + Metadata.Initialize(meta); + } + + /// + /// The name of the media object. + /// + /// Media object name. + public async Task GetName() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _descriptor.Name; + } + + /// + /// The path that point to the file, relative to its original import direction. + /// + /// Path to media object file. + public async Task GetPath() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _descriptor.Path; + } + + /// + /// Gets the media type of the media object. + /// + /// Media type of the media object. + public async Task GetMediaType() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _descriptor.Mediatype; + } + + [Obsolete("This field is not properly set in cineast 3.0")] + public async Task GetContentUrl() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _descriptor.ContentURL; + } + + /// + /// Retrieves all corresponding to this object. + /// + /// Note The segments have to be initialised beforehand, as only initialised segments are retrieved. + /// + /// + public async Task> GetSegments() + { + if (_segments != null) + { + return _segments; + } + + _segments = await SegmentRegistry.GetSegmentsOf(Id); + + return _segments; + } + + private sealed class IdEqualityComparer : IEqualityComparer + { + public bool Equals(ObjectData x, ObjectData y) + { + if (ReferenceEquals(x, y)) return true; + if (ReferenceEquals(x, null)) return false; + if (ReferenceEquals(y, null)) return false; + if (x.GetType() != y.GetType()) return false; + return x._id == y._id; + } + + public int GetHashCode(ObjectData obj) + { + return obj._id != null ? obj._id.GetHashCode() : 0; + } + } + + public static IEqualityComparer IdComparer { get; } = new IdEqualityComparer(); + + public MediaObjectDescriptor MediaObject + { + get + { + if (Initialized) + { + return _descriptor; + } + + throw new ArgumentException("Cannot get descriptor of uninitialised object: " + Id); + } + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ObjectData.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ObjectData.cs.meta new file mode 100644 index 0000000..717a813 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ObjectData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 76216cddcc224c3eb7ce4d537b45eee1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/QueryResponse.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/QueryResponse.cs new file mode 100644 index 0000000..dbc905b --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/QueryResponse.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Org.Vitrivr.CineastApi.Model; +using Vitrivr.UnityInterface.CineastApi.Model.Registries; +using Vitrivr.UnityInterface.CineastApi.Utils; + +namespace Vitrivr.UnityInterface.CineastApi.Model.Data +{ + /// + /// Data object containing all information associated with an executed query. + /// + [Serializable] + public class QueryResponse + { + /// + /// The executed query leading to the stored results. + /// + public readonly SimilarityQuery query; + + /// + /// Dictionary of result lists by result category. + /// + public readonly Dictionary> results; + + + /// Query to store data for + /// Dictionary of results by result category + public QueryResponse(SimilarityQuery query, Dictionary> results) + { + this.query = query; + this.results = results; + } + + /// + /// Batch fetches segment data for the top scoring number of segments in the results set. + /// + /// Number of top scoring segments from each result category to prefetch data for + public async Task Prefetch(int number) + { + // TODO: Prevent more than the number of segments to be prefetched in total + var segmentSet = new HashSet(); + foreach (var segmentList in results.Values) + { + segmentList.Take(number).Select(item => item.segment).ToList().ForEach(segment => segmentSet.Add(segment)); + } + + await SegmentRegistry.BatchFetchSegmentData(segmentSet.ToList()); + } + + public List GetMeanFusionResults() + { + return ResultUtils.MeanScoreFusion(results); + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/QueryResponse.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/QueryResponse.cs.meta new file mode 100644 index 0000000..d58dd15 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/QueryResponse.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8ec16800e45944c8db3402afad9fd37c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ScoredSegment.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ScoredSegment.cs new file mode 100644 index 0000000..cb64783 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ScoredSegment.cs @@ -0,0 +1,31 @@ +using System; + +namespace Vitrivr.UnityInterface.CineastApi.Model.Data +{ + /// + /// Data class for segment with associated score. + /// + [Serializable] + public class ScoredSegment : IComparable + { + public readonly SegmentData segment; + public readonly double score; + + public ScoredSegment(SegmentData segment, double score) + { + this.segment = segment; + this.score = score; + } + + public int CompareTo(object obj) + { + switch (obj) + { + case ScoredSegment other: + return -score.CompareTo(other.score); // Negative compare to because higher scores should come first + default: + throw new ArgumentException("Object is not a ScoredSegment!"); + } + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ScoredSegment.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ScoredSegment.cs.meta new file mode 100644 index 0000000..13d305f --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/ScoredSegment.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4eb2fc0b146f47c286fc90b32cf16ce0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/SegmentData.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/SegmentData.cs new file mode 100644 index 0000000..eaf0c25 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/SegmentData.cs @@ -0,0 +1,206 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Org.Vitrivr.CineastApi.Model; +using UnityEngine; +using Vitrivr.UnityInterface.CineastApi.Model.Registries; + +namespace Vitrivr.UnityInterface.CineastApi.Model.Data +{ + /// + /// Data object containing all information on a specific media segment. Use to + /// instantiate. + /// + [Serializable] + public class SegmentData + { + /// + /// actual data + /// + private MediaSegmentDescriptor _descriptor; + + /// + /// Segment ID uniquely identifying the corresponding media segment. + /// + private readonly string _id; + + // TODO: Consider combining lazy loading requests into batch requests every x seconds to reduce request overhead + private static readonly SemaphoreSlim InitLock = new SemaphoreSlim(1, 1); + + + public SegmentData(string id) + { + _id = id; + } + + public SegmentData(MediaSegmentDescriptor descriptor) + { + _descriptor = descriptor; + _id = descriptor.SegmentId; + Initialized = true; + } + + /// + /// Runs asynchronous segment ID query to initialize the data for this segment. + /// + private async Task InitializeAsync() + { + await InitLock.WaitAsync(); + try + { + if (Initialized) + { + Debug.LogError($"Attempted to initialize already initialized segment with id \"{_id}\"!"); + return; + } + + var queryResult = await CineastWrapper.SegmentApi.FindSegmentByIdAsync(_id); + if (queryResult.Content.Count != 1) + { + throw new Exception( + $"Unexpected number of segment data results for segment \"{_id}\": {queryResult.Content.Count}"); + } + + var result = queryResult.Content[0]; + Initialize(result); + } + finally + { + InitLock.Release(); + } + } + + /// + /// Initialize this with a previously retrieved . + /// + /// containing the data for this media segment. + public void Initialize(MediaSegmentDescriptor data) + { + if (Initialized) + { + Debug.LogError($"Attempted to initialize already initialized segment with id \"{_id}\"!"); + return; + } + + if (data.SegmentId != _id) + { + Debug.LogError($"Attempted to initialize segment with ID \"{_id}\" using MediaSegmentDescriptor" + + $" containing data for ID \"{data.SegmentId}\"!"); + return; + } + + _descriptor = data; + + Initialized = true; + } + + /// + /// ID of the + /// + public string Id => Initialized ? _descriptor.SegmentId : _id; + + public MediaSegmentDescriptor Descriptor + { + get + { + if (Initialized) + { + return _descriptor; + } + + throw new Exception("Not initialized"); // TODO + } + } + + + /// + /// Private flag whether actual data is available or not + /// + public bool Initialized { get; private set; } + + + /// + /// ID of the this belongs to. + /// + /// Id of associated media object. + public async Task GetObjectId() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _descriptor.ObjectId; + } + + /// + /// Start of the {@link MediaSegmentDescriptor} within the {@link MediaObjectDescriptor} in frames (e.g. for videos or audio). + /// + /// Segment start in frames. + public async Task GetStart() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _descriptor.Start; + } + + /// + /// End of the {@link MediaSegmentDescriptor} within the {@link MediaObjectDescriptor} in frames (e.g. for videos or audio). + /// + /// Segment end in frames. + public async Task GetEnd() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _descriptor.End; + } + + /// + /// Relative position of the {@link MediaSegmentDescriptor} within the {@link MediaObjectDescriptor} (starts with 1) + /// + /// Sequence number of this segment. + public async Task GetSequenceNumber() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _descriptor.SequenceNumber; + } + + /// + /// Absolute start of the {@link MediaSegmentDescriptor} within the {@link MediaObjectDescriptor} in seconds (e.g. for videos or audio). + /// + /// Segment start in seconds. + public async Task GetAbsoluteStart() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _descriptor.Startabs; + } + + /// + /// Absolute end of the {@link MediaSegmentDescriptor} within the {@link MediaObjectDescriptor} in seconds (e.g. for videos or audio). + /// + /// Segment end in seconds. + public async Task GetAbsoluteEnd() + { + if (!Initialized) + { + await InitializeAsync(); + } + + return _descriptor.Endabs; + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/SegmentData.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/SegmentData.cs.meta new file mode 100644 index 0000000..0970654 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Data/SegmentData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a8539fcd41c9842dbb55dc1201d28d89 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Query.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Query.meta new file mode 100644 index 0000000..4a7d2d2 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Query.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 20c91672851b4dba9f6d700f0cf04e5e +timeCreated: 1627982847 \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Query/RelationalOperator.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Query/RelationalOperator.cs new file mode 100644 index 0000000..3933c63 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Query/RelationalOperator.cs @@ -0,0 +1,43 @@ +namespace Vitrivr.UnityInterface.CineastApi.Model.Query +{ + public enum RelationalOperator + { + /// TRUE if A is equal to B. + Eq, + + /// TRUE if A is not equal to B. + NEq, + + /// TRUE if A is greater than or equal to B. + GEq, + + /// TRUE if A is less than or equal to B. + LEq, + + /// TRUE if A is greater than B. + Greater, + + /// TRUE if A is less than B. + Less, + + /// TRUE if A is between B and C + Between, + + /// TRUE if string A matches string B (SQL LIKE syntax expected). + Like, + + /// TRUE if string A does not match string B (SQL LIKE syntax expected). + NLike, + + /// TRUE for fulltext match; Apache Lucene syntax expected. + Match, + + /// TRUE if A is null. + IsNull, + + /// TRUE if A is not null. + IsNotNull, + + In + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Query/RelationalOperator.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Query/RelationalOperator.cs.meta new file mode 100644 index 0000000..eebaa10 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Query/RelationalOperator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f37fb1fa452743b9b8430232c464ac83 +timeCreated: 1627982872 \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries.meta new file mode 100644 index 0000000..c470af1 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4ed52889db4c474ab9b5eff9ef283379 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/ObjectRegistry.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/ObjectRegistry.cs new file mode 100644 index 0000000..aab3bca --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/ObjectRegistry.cs @@ -0,0 +1,108 @@ +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Org.Vitrivr.CineastApi.Model; +using UnityEngine; +using Vitrivr.UnityInterface.CineastApi.Model.Data; + +namespace Vitrivr.UnityInterface.CineastApi.Model.Registries +{ + /// + /// Class for instantiation and management of . + /// + public static class ObjectRegistry + { + /// + /// Internal storage and dictionary for media objects + /// + private static readonly ConcurrentDictionary Registry = + new ConcurrentDictionary(); + + public static List Objects => Registry.Values.ToList(); + + /// + /// Returns whether the registry has an item for the given id. + /// + /// The ObjectID to look for + /// TRUE if such an item exists, FALSE otherwise + public static bool Exists(string id) + { + return Registry.ContainsKey(id); + } + + /// + /// Resets the registry by clearing all object entries. + /// Caution This will actively clear the local cache. + /// + public static void Reset() + { + Registry.Clear(); + } + + /// + /// Retrieves the object for the given ID. If it does not exist, it will be created. + /// + /// + /// + public static ObjectData GetObject(string id) + { + if (!Exists(id)) + { + Registry.TryAdd(id, new ObjectData(id)); + } + + return Registry[id]; + } + + /// + /// Initialises the registry with data from a previously initialised + /// + /// Whether to initialise with metadata or not + /// + public static async Task Initialize(bool withMeta = false) + { + if (withMeta) + { + await BatchFetchObjectDataWithMeta(SegmentRegistry.GetObjects()); + } + else + { + await BatchFetchObjectData(SegmentRegistry.GetObjects()); + } + } + + public static async Task GetObjectOf(string segmentId) + { + return await SegmentRegistry.GetObjectOf(segmentId); + } + + public static async Task BatchFetchObjectData(IEnumerable objects) + { + var toInit = objects.Where(obj => !obj.Initialized).Select(obj => obj.Id).ToList(); + var results = await Task.Run(() => CineastWrapper.ObjectApi.FindObjectsByIdBatched(new IdList(toInit))); + results.Content.ForEach(dto => GetObject(dto.ObjectId).Initialize(dto)); + } + + public static async Task BatchFetchObjectDataWithMeta(List objects) + { + Debug.Log("Fetching obj data, then metadata"); + await BatchFetchObjectData(objects); + await BatchFetchObjectMetadata(objects); + } + + public static async Task BatchFetchObjectMetadata(IEnumerable objects) + { + var toInitObj = objects.Where(obj => !obj.Metadata.Initialized).ToList(); + var toInit = toInitObj.Select(obj => obj.Id).ToList(); + Debug.Log($"Having to initialise {toInit.Count} obj's metadata"); + var result = await Task.Run(() => + CineastWrapper.MetadataApi.FindMetadataForObjectIdBatchedAsync(new OptionallyFilteredIdList(ids: toInit))); + foreach (var obj in toInitObj) + { + obj.Metadata.Initialize(result); + } + Debug.Log("Finished fetching obj"); + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/ObjectRegistry.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/ObjectRegistry.cs.meta new file mode 100644 index 0000000..6f5ac9a --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/ObjectRegistry.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f90fc54e82454758a180cd6ffba3e004 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/SegmentRegistry.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/SegmentRegistry.cs new file mode 100644 index 0000000..87dbd4b --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/SegmentRegistry.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Org.Vitrivr.CineastApi.Model; +using Vitrivr.UnityInterface.CineastApi.Model.Data; + +namespace Vitrivr.UnityInterface.CineastApi.Model.Registries +{ + /// + /// Class for the instantiation and management of objects. + /// + public static class SegmentRegistry + { + /// + /// Internal storage / dict of ids <-> SegmentData + /// + private static readonly ConcurrentDictionary Registry = + new ConcurrentDictionary(); + + /// + /// Retrieves the segment for the given ID. + /// If it does not exist, it is created uninitialized. + /// + /// The segment id of the segment to retrieve + /// The corresponding to the id (or a new one). + public static SegmentData GetSegment(string id) + { + if (!Registry.ContainsKey(id)) + { + var segment = new SegmentData(id); + Registry.TryAdd(id, segment); + } + + return Registry[id]; + } + + /// + /// Returns segments corresponding to an object, by its id. + /// + /// + /// + public static async Task> GetSegmentsOf(string objectId) + { + var results = await Task.Run(() => CineastWrapper.SegmentApi.FindSegmentByObjectId(objectId)); + var segmentDescriptors = results.Content; + return segmentDescriptors.Select(descriptor => + { + var segment = GetSegment(descriptor.SegmentId); + if (!segment.Initialized) + { + segment.Initialize(descriptor); + } + + return segment; + }).ToList(); + } + + /// + /// Batch fetches data for the given segments. + /// + /// The segments for which to fetch the data. + public static async Task BatchFetchSegmentData(IEnumerable segments) + { + var uninitializedSegments = segments.Where(segment => !segment.Initialized).ToList(); + if (uninitializedSegments.Count == 0) + { + // All segments already initialized + return; + } + + var segmentIds = uninitializedSegments.Select(segment => segment.Id).ToList(); + + var results = await Task.Run(() => CineastWrapper.SegmentApi.FindSegmentByIdBatched(new IdList(segmentIds))); + + results.Content.ForEach(data => GetSegment(data.SegmentId).Initialize(data)); + } + + /// + /// Batch fetches all uninitialized segments in the registry. + /// + public static async Task BatchFetchAll() + { + await BatchFetchSegmentData(Registry.Values); + } + + /// + /// Extracts the object of previously initialised segments. + /// + /// + public static List GetObjects() + { + var oIds = new HashSet(); + Registry.Values.Where(segment => segment.Initialized).ToList() + .ForEach(segment => oIds.Add(segment.GetObjectId().Result)); + return oIds.Select(oid => new ObjectData(oid)).ToList(); + } + + /// + /// Resets the registry by clearing all segment entries. + /// + /// ATTENTION: Be aware that this means all objects in use must be released as well to + /// ensure data integrity. + /// + public static void Reset() + { + Registry.Clear(); + } + + /// + /// Whether the given segmentId is known to this registry + /// + /// + /// + public static bool Exists(string segmentId) + { + return Registry.ContainsKey(segmentId); + } + + /// + /// Gets the corresponding object of the segment specified + /// + /// + /// + /// + public static async Task GetObjectOf(string segmentId) + { + // TODO might require a dedicated cache + if (!Exists(segmentId)) + { + throw new ArgumentException($"Cannot get object of unknown segment with id {segmentId}"); + } + + var segment = Registry[segmentId]; + if (segment.Initialized) + { + return ObjectRegistry.GetObject(segment.GetObjectId().Result); + } + + var objectId = await segment.GetObjectId(); + return ObjectRegistry.GetObject(objectId); + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/SegmentRegistry.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/SegmentRegistry.cs.meta new file mode 100644 index 0000000..1e206ee --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Model/Registries/SegmentRegistry.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d586b69a0ad3e4d998bb78a345ff18cf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils.meta new file mode 100644 index 0000000..364c934 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cdd02b5d6098441abe07dfb268ed5a96 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/Base64Converter.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/Base64Converter.cs new file mode 100644 index 0000000..cf82711 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/Base64Converter.cs @@ -0,0 +1,45 @@ +using System; +using UnityEngine; + +namespace Vitrivr.UnityInterface.CineastApi.Utils +{ + public static class Base64Converter + { + private const string PrefixPrefix = "data:"; + private const string PrefixSuffix = ";base64,"; + public const string JsonPrefix = PrefixPrefix + "application/json" + PrefixSuffix; + public const string PNGPrefix = PrefixPrefix + "image/png" + PrefixSuffix; + + public static string StringToBase64(string str) + { + return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(str)); + } + + /// + /// Converts the given JSON string to a base 64 string with a plaintext JSON prefix. + /// + public static string JsonToBase64(string json) + { + return JsonPrefix + StringToBase64(json); + } + + public static string StringFromBase64(string str) + { + return System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(str)); + } + + public static string ImageToBase64PNG(Texture2D image) + { + return Convert.ToBase64String(image.EncodeToPNG()); + } + + public static Texture2D ImageFromBase64PNG(string encodedImage) + { + var data = Convert.FromBase64String(encodedImage); + // Texture size doesn't matter because it will be replaced during load + var texture = new Texture2D(2, 2); + texture.LoadImage(data); + return texture; + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/Base64Converter.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/Base64Converter.cs.meta new file mode 100644 index 0000000..09c626f --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/Base64Converter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7d0ab3777261248f09da064c5a878ccf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfigManager.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfigManager.cs new file mode 100644 index 0000000..52c2094 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfigManager.cs @@ -0,0 +1,92 @@ +using System.IO; +using Org.Vitrivr.CineastApi.Client; +using UnityEngine; +using Vitrivr.UnityInterface.CineastApi.Model.Config; + +namespace Vitrivr.UnityInterface.CineastApi.Utils +{ + /// + /// Manager to load and store the configuration from the file system + /// + public class CineastConfigManager + { + public const string FILE_NAME = "cineastapi"; + public const string FILE_EXTENSION = "json"; + + + private static CineastConfigManager _instance; + + /// + /// The single instance of the cineast config manager + /// + public static CineastConfigManager Instance => _instance ?? (_instance = new CineastConfigManager()); + + + private CineastConfigManager() + { + apiConfig = new Configuration {BasePath = Config.cineastHost}; + } + + /// + /// Cached cineast config. Access via public Config + /// + private CineastConfig config; + + /// + /// The cineast config. First attempts to read from file, otherwise uses default. + /// + public CineastConfig Config + { + get + { + if (config == null) + { + if (File.Exists(GetFilePath())) + { + var streamReader = File.OpenText(GetFilePath()); + var json = streamReader.ReadToEnd(); + streamReader.Close(); + config = CineastConfig.GetDefault(); + JsonUtility.FromJsonOverwrite(json, config); + } + else + { + config = CineastConfig.GetDefault(); + } + } + + config.SanitizeCategories(); + return config; + } + set => config = value; + } + + /// + /// Internal apiConfig + /// + private Configuration apiConfig; + + /// + /// Api config setup with basePath from config file + /// + public Configuration ApiConfiguration => apiConfig; + + /// + /// Stores the currently active configuration + /// + public void StoreConfig() + { + FileUtils.WriteJson(config, GetFilePath()); + } + + public static string GetFilePath() + { +#if UNITY_EDITOR + var folder = Application.dataPath; +#else + var folder = Application.persistentDataPath; +#endif + return Path.Combine(folder, $"{FILE_NAME}.{FILE_EXTENSION}"); + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfigManager.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfigManager.cs.meta new file mode 100644 index 0000000..b3645d8 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/CineastConfigManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 46e82292769a4ee8a59933b15409c7b4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/FileUtils.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/FileUtils.cs new file mode 100644 index 0000000..69fbb23 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/FileUtils.cs @@ -0,0 +1,65 @@ +using System.IO; +using Newtonsoft.Json; +using UnityEngine; + +namespace Vitrivr.UnityInterface.CineastApi.Utils +{ + public class FileUtils + { + /// + /// Attempts to read the with path specified json file using Unity's JSON utility + /// + /// + /// + /// + public static T ReadJsonUnity(string path) + { + var sr = File.OpenText(path); + var content = sr.ReadToEnd(); + sr.Close(); + return JsonUtility.FromJson(content); + } + + /// + /// Attempts to write a json file using Unity's JSON utility + /// + /// + /// + public static void WriteJsonUnity(object obj, string path) + { + var sw = File.CreateText(path); + sw.Write(JsonUtility.ToJson(obj)); + sw.WriteLine(""); // empty line at EOF + sw.Flush(); + sw.Close(); + } + + /// + /// Attempts to read the with path specified json file using Unity's JSON utility + /// + /// + /// + /// + public static T ReadJson(string path) + { + var sr = File.OpenText(path); + var content = sr.ReadToEnd(); + sr.Close(); + return JsonConvert.DeserializeObject(content); + } + + /// + /// Attempts to write a json file using Unity's JSON utility + /// + /// + /// + public static void WriteJson(object obj, string path) + { + var sw = File.CreateText(path); + sw.Write(JsonConvert.SerializeObject(obj)); + sw.WriteLine(""); // empty line at EOF + sw.Flush(); + sw.Close(); + } + } +} diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/FileUtils.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/FileUtils.cs.meta new file mode 100644 index 0000000..14bde62 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/FileUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 56464d6ed64b24a95803579239d63d79 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/MetadataUtils.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/MetadataUtils.cs new file mode 100644 index 0000000..1da073d --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/MetadataUtils.cs @@ -0,0 +1,111 @@ +using System; +using Vitrivr.UnityInterface.CineastApi.Model.Data; + +namespace Vitrivr.UnityInterface.CineastApi.Utils +{ + /// + /// Utilities for metadata, including helper methods for "built-it" metadata + /// + public static class MetadataUtils + { + + /// + /// The domain name for spatial meta data + /// Given by cineast + /// + public const string SPATIAL_DOMAIN = "LOCATION"; + /// + /// The domain name for temporal meta data. + /// Given by cineast + /// + public const string TEMPORAL_DOMAIN = "TIME"; + + /// + /// Metadata key for latitude, in the spatial domain + /// + public const string SPATIAL_LATITUDE = "latitude"; + /// + /// Metadata key for longitude, in the spatial domain + /// + public const string SPATIAL_LONGITUDE = "longitude"; + /// + /// Metadata key for bearing, in the spatial domain + /// + public const string SPATIAL_BEARING = "bearing"; + + /// + /// Metadata key for datetime, in the temporal domain + /// + public const string TEMPORAL_DATETIME = "datetime"; + + /// + /// Quick-access to latitude + /// + /// + /// + /// If the store was not initialised previously + public static double GetLatitude(MetadataStore store) + { + if (!store.Initialized) + { + throw new ArgumentException("MetadataStore has to be initialised!"); + } + + return store.Exists(SPATIAL_DOMAIN, SPATIAL_LATITUDE) + ? double.Parse(store.Get(SPATIAL_DOMAIN, SPATIAL_LATITUDE)) + : double.NaN; + } + + /// + /// Quick-access to longitude + /// + /// + /// + /// If the store was not initialised previously + public static double GetLongitude(MetadataStore store) + { + if (!store.Initialized) + { + throw new ArgumentException("MetadataStore has to be initialised!"); + } + + return store.Exists(SPATIAL_DOMAIN, SPATIAL_LONGITUDE) + ? double.Parse(store.Get(SPATIAL_DOMAIN, SPATIAL_LONGITUDE)) + : double.NaN; + } + + /// + /// Quick-access to bearing + /// + /// + /// + /// If the store was not initialised previously + public static double GetBearing(MetadataStore store) + { + if (!store.Initialized) + { + throw new ArgumentException("MetadataStore has to be initialised!"); + } + return store.Exists(SPATIAL_DOMAIN, SPATIAL_BEARING) + ? double.Parse(store.Get(SPATIAL_DOMAIN, SPATIAL_BEARING)) : double.NaN; + } + + /// + /// Quick-access to datetime + /// + /// + /// + /// If the store was not initialised previously + public static string GetDateTime(MetadataStore store) + { + if (!store.Initialized) + { + throw new ArgumentException("MetadataStore has to be initialised!"); + } + + return store.Exists(TEMPORAL_DOMAIN, TEMPORAL_DATETIME) ? store.Get(TEMPORAL_DOMAIN, TEMPORAL_DATETIME) : ""; + } + + + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/MetadataUtils.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/MetadataUtils.cs.meta new file mode 100644 index 0000000..dd3ae77 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/MetadataUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d392f03732e544fe937d8242ac068ce8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/PathResolver.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/PathResolver.cs new file mode 100644 index 0000000..c7e142d --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/PathResolver.cs @@ -0,0 +1,53 @@ +using System; + +namespace Vitrivr.UnityInterface.CineastApi.Utils +{ + public class PathResolver + { + /// + /// Resolves a media path by replacing any resource tokens with their respective values. + /// + /// The path to resolve + /// The ID of the media object + /// The ID of the media object segment + /// The file name of the media object + /// The path of the media object in its resource location + /// The media type of the media object + /// The file extension + /// The resolved path + public static string ResolvePath(string path, + string objectId = null, + string segmentId = null, + string objectName = null, + string objectPath = null, + string mediaType = null, + string extension = null) + { + return path + .Replace(":o", objectId) + .Replace(":s", segmentId) + .Replace(":S", segmentId?.Substring(3)) + .Replace(":n", objectName) + .Replace(":p", objectPath) + .Replace(":t", mediaType) + .Replace(":T", mediaType?.ToUpper()) + .Replace(":x", extension); + } + + /// + /// Combines URL parts similarly to how Path.Combine combines paths. + /// + /// URL parts to combine. + /// The combined URL. + public static string CombineUrl(params string[] parts) + { + var url = new Uri(parts[0]); + for (var i = 1; i < parts.Length; i++) + { + url = new Uri(url, parts[i]); + } + + return url.ToString(); + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/PathResolver.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/PathResolver.cs.meta new file mode 100644 index 0000000..ba46fcc --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/PathResolver.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9bcf65cf0fb514c2d8c3f81e2e7b3b02 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryBuilder.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryBuilder.cs new file mode 100644 index 0000000..222a4cd --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryBuilder.cs @@ -0,0 +1,69 @@ +using System.Collections.Generic; +using System.Linq; +using Org.Vitrivr.CineastApi.Model; +using Vitrivr.UnityInterface.CineastApi.Model.Config; + +namespace Vitrivr.UnityInterface.CineastApi.Utils +{ + public class QueryBuilder + { + /// + /// Generic similarity query for given terms + /// + /// + /// + public static SimilarityQuery BuildSimilarityQuery(params QueryTerm[] terms) + { + var qc = new QueryComponent(terms.ToList()); + var sq = new SimilarityQuery(new List {qc}); + return sq; + } + + /// + /// Convenience method to create spatial similarity query + /// + /// Latitude in WSG85 degrees + /// Longitude in WSG85 + /// + public static SimilarityQuery BuildSpatialSimilarityQuery(double lat, double lon) + { + return BuildSimilarityQuery(QueryTermBuilder.BuildLocationTerm(lat, lon)); + } + + /// + /// Convenience method to create temporal similarity query + /// + /// The timestamp in UTC time format + /// + public static SimilarityQuery BuildTemporalSimilarityQuery(string utcTime) + { + return BuildSimilarityQuery(QueryTermBuilder.BuildTimeTerm(utcTime)); + } + + /// + /// A simple Query-by-Example query, using Edge and Global color categories + /// + /// Base64 encoded image + /// + public static SimilarityQuery BuildSimpleQbEQuery(string base64) + { + return BuildSimilarityQuery(QueryTermBuilder.BuildImageTermForCategories(base64, new List + { + CineastConfigManager.Instance.Config.categoryMappings.mapping[ + CategoryMappings.GLOBAL_COLOR_CATEGORY], + CineastConfigManager.Instance.Config.categoryMappings.mapping[ + CategoryMappings.EDGE_CATEGORY], + })); + } + + /// + /// Convenience method to create tags only query + /// + /// Tags to query + /// + public static SimilarityQuery BuildTagsSimilarityQuery(List<(string id, string name)> tags) + { + return BuildSimilarityQuery(QueryTermBuilder.BuildTagTerm(tags)); + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryBuilder.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryBuilder.cs.meta new file mode 100644 index 0000000..9db2947 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryBuilder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d95fd51ba84a40c290ca01507e138385 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryTermBuilder.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryTermBuilder.cs new file mode 100644 index 0000000..0c0f132 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryTermBuilder.cs @@ -0,0 +1,237 @@ +using System.Collections.Generic; +using System.Linq; +using Org.Vitrivr.CineastApi.Model; +using UnityEngine; +using Vitrivr.UnityInterface.CineastApi.Model.Config; +using Vitrivr.UnityInterface.CineastApi.Model.Query; + +namespace Vitrivr.UnityInterface.CineastApi.Utils +{ + public class QueryTermBuilder + { + /// + /// Builds a Boolean consisting of a single condition. + /// + /// Attribute of condition + /// Relational operator specifying condition operation + /// Conditional values + /// The corresponding query term + public static QueryTerm BuildBooleanTerm(string attribute, RelationalOperator op, params string[] values) + { + var expressionJson = BuildBooleanTermJson(attribute, op, values); + var data = Base64Converter.JsonToBase64($"[{expressionJson}]"); + + return new QueryTerm(QueryTerm.TypeEnum.BOOLEAN, data, new List {"boolean"}); + } + + /// + /// Builds a Boolean consisting of multiple conditions. + /// + /// Enumerable of conditions + /// The corresponding query term + public static QueryTerm BuildBooleanTerm( + IEnumerable<(string attribute, RelationalOperator op, string[] values)> conditions) + { + var conditionsJson = conditions.Select(c => BuildBooleanTermJson(c.attribute, c.op, c.values)); + var data = Base64Converter.JsonToBase64($"[{string.Join(",", conditionsJson)}]"); + + return new QueryTerm(QueryTerm.TypeEnum.BOOLEAN, data, new List {"boolean"}); + } + + /// + /// Converts the given Boolean query term condition parameters into the expected JSON format. + /// + /// Attribute of condition + /// Relational operator specifying condition operation + /// Conditional values + /// The condition as JSON string + public static string BuildBooleanTermJson(string attribute, RelationalOperator op, params string[] values) + { + var attributeJson = $"\"attribute\":\"{attribute}\""; + var operatorJson = $"\"operator\":\"{op.ToString().ToUpper()}\""; + var valuesString = values.Length == 1 ? $"\"{values[0]}\"" : $"[\"{string.Join("\",\"", values)}\"]"; + var valuesJson = $"\"values\":{valuesString}"; + + return $"{{{attributeJson},{operatorJson},{valuesJson}}}"; + } + + /// + /// Builds a of type IMAGE with category edge. + /// + /// Base64 encoded image + /// The corresponding query term + public static QueryTerm BuildEdgeTerm(string data) + { + var qt = new QueryTerm(QueryTerm.TypeEnum.IMAGE, data, new List()); + qt.Categories.Add( + CineastConfigManager.Instance.Config.categoryMappings.mapping[CategoryMappings.EDGE_CATEGORY]); + return qt; + } + + /// + /// Builds a of type IMAGE with category edge. + /// + /// Image to use for query + /// The corresponding query term + public static QueryTerm BuildEdgeTerm(Texture2D image) + { + var encodedImage = Base64Converter.PNGPrefix + Base64Converter.ImageToBase64PNG(image); + return BuildEdgeTerm(encodedImage); + } + + /// + /// Builds a of type IMAGE with category global color + /// + /// Base64 encoded image + /// The corresponding query term + public static QueryTerm BuildGlobalColorTerm(string data) + { + var qt = new QueryTerm(QueryTerm.TypeEnum.IMAGE, data, + new List + { + CineastConfigManager.Instance.Config.categoryMappings.mapping[ + CategoryMappings.GLOBAL_COLOR_CATEGORY] + }); + return qt; + } + + /// + /// Builds a of type IMAGE with category global color + /// + /// Image to use for query + /// The corresponding query term + public static QueryTerm BuildGlobalColorTerm(Texture2D image) + { + var encodedImage = Base64Converter.PNGPrefix + Base64Converter.ImageToBase64PNG(image); + return BuildGlobalColorTerm(encodedImage); + } + + /// + /// Builds a of type IMAGE with given categories + /// + /// Base64 encoded image + /// A list of categories + /// The corresponding query term + public static QueryTerm BuildImageTermForCategories(string data, List categories) + { + return new QueryTerm(QueryTerm.TypeEnum.IMAGE, data, categories); + } + + /// + /// Builds a of type IMAGE with given categories + /// + /// Image to use for query + /// A list of categories + /// The corresponding query term + public static QueryTerm BuildImageTermForCategories(Texture2D image, List categories) + { + var encodedImage = Base64Converter.PNGPrefix + Base64Converter.ImageToBase64PNG(image); + return BuildImageTermForCategories(encodedImage, categories); + } + + public static QueryTerm BuildLocationTerm(double latitude, double longitude) + { + var qt = new QueryTerm( + QueryTerm.TypeEnum.LOCATION, + $"[{latitude},{longitude}]", + new List + {CineastConfigManager.Instance.Config.categoryMappings.mapping[CategoryMappings.SPATIAL_CATEGORY]}); + return qt; + } + + /// + /// Builds a of type TAG with category tags + /// + /// Base64 encoded JSON list of tags + /// The corresponding query term for the given tags string + public static QueryTerm BuildTagTerm(string tags) + { + var qt = new QueryTerm(QueryTerm.TypeEnum.TAG, + Base64Converter.JsonPrefix + tags, + new List + {CineastConfigManager.Instance.Config.categoryMappings.mapping[CategoryMappings.TAGS_CATEGORY]}); + return qt; + } + + /// + /// Builds a of type TAG with category tags + /// + /// List of (tag ID, tag name) pairs + /// The corresponding query term for the given tags string + public static QueryTerm BuildTagTerm(IEnumerable<(string id, string name)> tags) + { + var tagStrings = tags.Select(tag => + $"{{\"id\":\"{tag.id}\",\"name\":\"{tag.name}\",\"description\":\"\"}}"); + + var tagList = $"[{string.Join(",", tagStrings)}]"; + + var qt = new QueryTerm(QueryTerm.TypeEnum.TAG, + Base64Converter.JsonToBase64(tagList), + new List + {CineastConfigManager.Instance.Config.categoryMappings.mapping[CategoryMappings.TAGS_CATEGORY]}); + return qt; + } + + /// + /// Builds a of type TEXT with the specified categories + /// + /// Text to search for + /// List of categories to search + /// The corresponding query term for the given text string + public static QueryTerm BuildTextTerm(string text, List categories) + { + var qt = new QueryTerm(QueryTerm.TypeEnum.TEXT, + text, + categories); + return qt; + } + + /// + /// Builds a of type TEXT with the specified categories + /// + /// Text to search for + /// Whether ocr data should be searched + /// Whether asr data should be searched + /// Whether scene caption data should be searched + /// The corresponding query term for the given text string + public static QueryTerm BuildTextTerm(string text, bool ocr = false, bool asr = false, bool scenecaption = false) + { + var categories = new List(); + + if (ocr) + { + categories.Add("ocr"); + } + + if (asr) + { + categories.Add("asr"); + } + + if (scenecaption) + { + categories.Add("scenecaption"); + } + + var qt = new QueryTerm(QueryTerm.TypeEnum.TEXT, + text, + categories); + return qt; + } + + /// + /// Builds a of type TIME with category temporal + /// + /// The timestamp in utc time format + /// The corresponding query term using the temporal category and time type + public static QueryTerm BuildTimeTerm(string utcTime) + { + var qt = new QueryTerm(QueryTerm.TypeEnum.TIME, utcTime, + new List + { + CineastConfigManager.Instance.Config.categoryMappings.mapping[CategoryMappings.TEMPORAL_CATEGORY] + }); + return qt; + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryTermBuilder.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryTermBuilder.cs.meta new file mode 100644 index 0000000..34b6698 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/QueryTermBuilder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ca6f7c95dbbf4e8dbb7159dfa14ede1d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/ResultUtils.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/ResultUtils.cs new file mode 100644 index 0000000..9d7a8fa --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/ResultUtils.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Org.Vitrivr.CineastApi.Model; +using Vitrivr.UnityInterface.CineastApi.Model.Data; +using Vitrivr.UnityInterface.CineastApi.Model.Registries; + +namespace Vitrivr.UnityInterface.CineastApi.Utils +{ + public static class ResultUtils + { + /// + /// Extracts an from a given similarity result. + /// + /// The similarity result to extract the ids of + /// Limit the number of ids + /// An id list of the results + /// If is empty + public static IdList IdsOf(SimilarityQueryResultBatch result, int maxResults = 1000) + { + if (result.Results.Count < 1) + { + throw new IndexOutOfRangeException("Cannot extract ids from nonexistent results object"); + } + + var theIds = result.Results[0].Content.Take(maxResults).Select(res => res.Key).ToList(); + return new IdList(theIds); + } + + /// + /// Converts a query result into a more easily processable list of and score. + /// + /// The query results to convert + /// The maximum number of results to include from each results category + /// Dictionary of results by result category + public static Dictionary> ToSegmentData( + SimilarityQueryResultBatch results, int maxResults) + { + return results.Results.Where(similarityQueryResult => similarityQueryResult.Content.Count > 0) + .ToDictionary( + similarityQueryResult => similarityQueryResult.Category, + similarityQueryResult => similarityQueryResult.Content.Take(maxResults) + .Select(result => new ScoredSegment(SegmentRegistry.GetSegment(result.Key), result.Value)) + .ToList() + ); + } + + public static List ScoreFusion(Dictionary> results, + Func fusion) + { + if (results.Keys.Count < 2) + { + return results.Values.FirstOrDefault(); + } + + var categoryMaps = results.Select(entry => + entry.Value.ToDictionary(scoredSegment => scoredSegment.segment, scoredSegment => scoredSegment.score)) + .ToList(); + + var segmentSet = categoryMaps.Aggregate(new HashSet(), (set, map) => + { + set.UnionWith(map.Keys); + return set; + }); + + var mergedResults = segmentSet.Select(segment => new ScoredSegment(segment, + fusion( + categoryMaps.Select(map => map.TryGetValue(segment, out var score) ? score : 0.0) + .ToArray() + ) + )).ToList(); + + mergedResults.Sort(); + + return mergedResults; + } + + public static List MeanScoreFusion(Dictionary> results) + { + return ScoreFusion(results, scores => scores.Average()); + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/ResultUtils.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/ResultUtils.cs.meta new file mode 100644 index 0000000..677e2b3 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/ResultUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cde09551d6334a138c9cf5c87a8f7fd8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/TimeUtils.cs b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/TimeUtils.cs new file mode 100644 index 0000000..379552a --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/TimeUtils.cs @@ -0,0 +1,32 @@ +namespace Vitrivr.UnityInterface.CineastApi.Utils +{ + public class TimeUtils + { + /// + /// Converts the given year (numerical value) to a ISO8601 conform timestamp. + /// This conversion isn't smart and doesn't check for negative values or too large ones. + /// + /// The year as a numerical value (usually a 4 digit, positive integer) + /// A ISO8601 conform timestamp string, set to January the first at noon in this year. No timezone specified + public static string ConvertYearToISO8601(int year) + { + return ConvertToISO8601(year, 1, 1, 12, 0, 0); + } + + /// + /// Converts the given time specification to a ISO8601 conform timestamp representation. + /// This conversion isn't smart and doesn't perform any sanity checks (e.g. 0 < minutes < 59 ) + /// + /// + /// + /// + /// + /// + /// + /// + public static string ConvertToISO8601(int year, int month, int dayOfMonth, int hours, int minutes, int seconds) + { + return $"{year:D4}-{month:D2}-{dayOfMonth:D2}T{hours:D2}:{minutes:D2}:{seconds:D2}Z"; // year-month-day[THH:MM:SSZ] + } + } +} \ No newline at end of file diff --git a/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/TimeUtils.cs.meta b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/TimeUtils.cs.meta new file mode 100644 index 0000000..5119c67 --- /dev/null +++ b/Runtime/Vitrivr/UnityInterface/CineastApi/Utils/TimeUtils.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 273203cb35694276bf31ef6e78531ad8 +timeCreated: 1606901171 \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..ed5812e --- /dev/null +++ b/build.gradle @@ -0,0 +1,83 @@ +import org.apache.tools.ant.taskdefs.condition.Os +/* Import to determine os*/ + +/* Get the openapi generator plugin */ +plugins { + id "org.openapi.generator" version "4.3.1" +} + +/* Setup OpenApi Specs (OAS): Defaults to default.*/ +def cineastOAS = "http://localhost:4567/openapi-specs" +/* If gradle gets 'oas' argument (with -Poas="path/to/OAS"), take these */ +if(project.hasProperty('oas')){ + cineastOAS = oas +} + +/* The OpenApi generator task */ +openApiGenerate { + generatorName = "csharp" + inputSpec = cineastOAS + outputDir = "$rootDir/Generated" + packageName = "Org.Vitrivr.CineastApi" + skipValidateSpec = true +} + +/* Customized clean task to delete OpenAPI generated*/ +task clean(type: Delete){ + delete "$rootDir/Generated", fileTree("$rootDir/Runtime/Libs") { include "**/*.dll", "**/*.xml", "**/*.meta"} +} + +/* Task to clean only unused files */ +task tidy(type: Delete){ + delete "$rootDir/Generated" +} + +/* Build the openapi dll */ +task buildOpenApi(type: Exec){ + dependsOn tasks.openApiGenerate + workingDir "$rootDir/Generated" + if( Os.isFamily(Os.FAMILY_WINDOWS)){ + /* only windows */ + commandLine = "$rootDir/Generated/build.bat" + }else{ + /* Should work with .sh */ + dependsOn "modex" + commandLine = "$rootDir/Generated/build.sh" + } +} + +task modex(type: Exec){ + workingDir "$rootDir/Generated" + if( !Os.isFamily(Os.FAMILY_WINDOWS)){ + /* Should work with .sh */ + commandLine "chmod", "+x", "$rootDir/Generated/build.sh" + } +} + + +/* Copy what buildOpenApi produced to unity folder */ +task deployLibs(type: Copy){ + from(file("$rootDir/Generated/bin")) + into(file("$rootDir/Runtime/Libs")) + rename("RestSharp.dll", "RestSharp.Cineast.dll") + rename("Newtonsoft.Json.dll", "Newtonsoft.Json.Cineast.dll") + rename("JsonSubTypes.dll", "JsonSubTypes.Cineast.dll") +} + +/* Copy the mandatory link.xml */ +task deployLink(type:Copy){ + from file("$rootDir/link.xml") + into(file("$rootDir/Runtime/Libs")) +} + +/* Do all the things */ +task('deploy'){ + dependsOn 'deployLink' +} + +/* Specify order */ +deployLibs.dependsOn buildOpenApi +deployLink.dependsOn deployLibs +tasks.openApiGenerate.mustRunAfter clean +buildOpenApi.mustRunAfter tasks.openApiGenerate +modex.mustRunAfter tasks.openApiGenerate diff --git a/build.gradle.meta b/build.gradle.meta new file mode 100644 index 0000000..2ddf05b --- /dev/null +++ b/build.gradle.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a80baa19bff8149aa89a7c187095af78 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/gradle.meta b/gradle.meta new file mode 100644 index 0000000..ae66b27 --- /dev/null +++ b/gradle.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 02928a13510604af09ea4ae6dec19b0c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/gradle/wrapper.meta b/gradle/wrapper.meta new file mode 100644 index 0000000..7aec1ed --- /dev/null +++ b/gradle/wrapper.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c9e8d6932245c4dd3bb884e1b514ba11 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e708b1c Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.jar.meta b/gradle/wrapper/gradle-wrapper.jar.meta new file mode 100644 index 0000000..2905ace --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar.meta @@ -0,0 +1,32 @@ +fileFormatVersion: 2 +guid: 2d902de49056d47af8a4beb919f017e3 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Android: Android + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..442d913 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradle/wrapper/gradle-wrapper.properties.meta b/gradle/wrapper/gradle-wrapper.properties.meta new file mode 100644 index 0000000..d7bc5af --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8eab0f4ff47df4ed8acf3e254d39d9b6 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..4f906e0 --- /dev/null +++ b/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..ac1b06f --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/gradlew.bat.meta b/gradlew.bat.meta new file mode 100644 index 0000000..af80f52 --- /dev/null +++ b/gradlew.bat.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 07b38bad7e5d64087b508a07005d5c7d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/gradlew.meta b/gradlew.meta new file mode 100644 index 0000000..ac8b937 --- /dev/null +++ b/gradlew.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 68b5afd0979f743b384954fa93ff3fcc +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/link.xml b/link.xml new file mode 100644 index 0000000..2392ca0 --- /dev/null +++ b/link.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/link.xml.meta b/link.xml.meta new file mode 100644 index 0000000..686a5f3 --- /dev/null +++ b/link.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d0efa9e0c138445f8b2f87b1901c4875 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/package.json b/package.json new file mode 100644 index 0000000..15f407f --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "name": "org.vitrivr.unityinterface.cineastapi", + "version": "1.0.0-SNAPSHOT", + "displayName": "Cineast Unity Interface", + "description": "An all-unity client for [Cineast](https://github.com/vitrivr/cineast/).", + "unity": "2019.4", + "keywords": [ + "cineast","restclient","vitrivr","multimediaretrieval","retreival","multimedia" + ], + "author": { + "name": "Florian Spiess & Loris Sauter", + "email": "firstname.lastname@unibas.ch" + } +} diff --git a/Assets/CineastUnityInterface/package.json.meta b/package.json.meta similarity index 84% rename from Assets/CineastUnityInterface/package.json.meta rename to package.json.meta index a60c29f..f8c7c16 100644 --- a/Assets/CineastUnityInterface/package.json.meta +++ b/package.json.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 0426623f26971dc488075109c3d1bafd -TextScriptImporter: +PackageManifestImporter: externalObjects: {} userData: assetBundleName: diff --git a/publish.py b/publish.py deleted file mode 100644 index 8a36648..0000000 --- a/publish.py +++ /dev/null @@ -1,26 +0,0 @@ -""" -Utility to publish the unity package to make it available for upm. - -For usage, invoke - -$> python publish.py --help - -Thanks to https://github.com/neogeek/unity-package-example for providing an excellent example -""" -import argparse -import os - -PACKAGE_DIR = 'Assets/CineastUnityInterface' - -parser = argparse.ArgumentParser(description="Utility to publish the stand-alone unity package available for upm.") - -parser.add_argument("-r", "--release", help="The name of the release branch", default="release") - - -args = parser.parse_args() - -cmd = 'git subtree push --prefix "%s" origin %s' % (PACKAGE_DIR, args.release) - -os.system(cmd) - -print('Published!')