diff --git a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs index c55ec84cb6..57232b5bb7 100644 --- a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs @@ -50,7 +50,6 @@ namespace OpenSim.Region.Framework.Interfaces JsonStoreNodeType GetPathType(UUID storeID, string path); bool TestStore(UUID storeID); - bool TestPath(UUID storeID, string path, bool useJson); bool SetValue(UUID storeID, string path, string value, bool useJson); bool RemoveValue(UUID storeID, string path); diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs index 890e1dd782..aee70828ef 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs @@ -84,11 +84,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore protected static Regex m_PathComponent = new Regex("\\.({[^}]+}|\\[[0-9]+\\]|\\[\\+\\])"); // extract the internals of an array reference - protected static Regex m_SimpleArrayPattern = new Regex("\\[([0-9]+)\\]"); - protected static Regex m_ArrayPattern = new Regex("\\[([0-9]+|\\+)\\]"); + protected static Regex m_SimpleArrayPattern = new Regex("^\\[([0-9]+)\\]$"); + protected static Regex m_ArrayPattern = new Regex("^\\[([0-9]+|\\+)\\]$"); // extract the internals of a has reference - protected static Regex m_HashPattern = new Regex("{([^}]+)}"); + protected static Regex m_HashPattern = new Regex("^{([^}]+)}$"); // ----------------------------------------------------------------- /// @@ -153,28 +153,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return JsonStoreNodeType.Undefined; } - // ----------------------------------------------------------------- - /// - /// - /// - // ----------------------------------------------------------------- - public bool TestPath(string expr, bool useJson) - { - Stack path; - if (! ParsePathExpression(expr,out path)) - return false; - - OSD result = ProcessPathExpression(ValueStore,path); - - if (result == null) - return false; - - if (useJson || OSDBaseType(result.Type)) - return true; - - return false; - } - // ----------------------------------------------------------------- /// /// diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs index 43f9613536..35407f6497 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs @@ -261,38 +261,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return JsonStoreNodeType.Undefined; } - // ----------------------------------------------------------------- - /// - /// - /// - // ----------------------------------------------------------------- - public bool TestPath(UUID storeID, string path, bool useJson) - { - if (! m_enabled) return false; - - JsonStore map = null; - lock (m_JsonValueStore) - { - if (! m_JsonValueStore.TryGetValue(storeID,out map)) - { - m_log.InfoFormat("[JsonStore] Missing store {0}",storeID); - return false; - } - } - - try - { - lock (map) - return map.TestPath(path,useJson); - } - catch (Exception e) - { - m_log.Error(string.Format("[JsonStore]: Path test failed for {0} in {1}", path, storeID), e); - } - - return false; - } - // ----------------------------------------------------------------- /// /// diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs index e98103aec6..db4ad980c4 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs @@ -168,31 +168,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { m_comms.RegisterScriptInvocations(this); m_comms.RegisterConstants(this); - - // m_comms.RegisterScriptInvocation(this, "JsonCreateStore"); - // m_comms.RegisterScriptInvocation(this, "JsonDestroyStore"); - // m_comms.RegisterScriptInvocation(this, "JsonTestStore"); - - // m_comms.RegisterScriptInvocation(this, "JsonReadNotecard"); - // m_comms.RegisterScriptInvocation(this, "JsonWriteNotecard"); - - // m_comms.RegisterScriptInvocation(this, "JsonTestPathList"); - // m_comms.RegisterScriptInvocation(this, "JsonTestPath"); - // m_comms.RegisterScriptInvocation(this, "JsonTestPathJson"); - - // m_comms.RegisterScriptInvocation(this, "JsonGetValue"); - // m_comms.RegisterScriptInvocation(this, "JsonGetValueJson"); - - // m_comms.RegisterScriptInvocation(this, "JsonTakeValue"); - // m_comms.RegisterScriptInvocation(this, "JsonTakeValueJson"); - - // m_comms.RegisterScriptInvocation(this, "JsonReadValue"); - // m_comms.RegisterScriptInvocation(this, "JsonReadValueJson"); - - // m_comms.RegisterScriptInvocation(this, "JsonSetValue"); - // m_comms.RegisterScriptInvocation(this, "JsonSetValueJson"); - - // m_comms.RegisterScriptInvocation(this, "JsonRemoveValue"); } catch (Exception e) { @@ -325,18 +300,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return (int)m_store.GetPathType(storeID,path); } - [ScriptInvocation] - public int JsonTestPath(UUID hostID, UUID scriptID, UUID storeID, string path) - { - return m_store.TestPath(storeID,path,false) ? 1 : 0; - } - - [ScriptInvocation] - public int JsonTestPathJson(UUID hostID, UUID scriptID, UUID storeID, string path) - { - return m_store.TestPath(storeID,path,true) ? 1 : 0; - } - // ----------------------------------------------------------------- /// ///