public virtual void SetStructField(String schemaNS, String structName, String fieldNS , String fieldName, String fieldValue, PropertyOptions options) { ParameterAsserts.AssertSchemaNS(schemaNS); ParameterAsserts.AssertStructName(structName); String fieldPath = structName + XMPPathFactory.ComposeStructFieldPath(fieldNS, fieldName ); SetProperty(schemaNS, fieldPath, fieldValue, options); }
public virtual XMPProperty GetStructField(String schemaNS, String structName, String fieldNS, String fieldName) { // fieldNS and fieldName are checked inside composeStructFieldPath ParameterAsserts.AssertSchemaNS(schemaNS); ParameterAsserts.AssertStructName(structName); String fieldPath = structName + XMPPathFactory.ComposeStructFieldPath(fieldNS, fieldName ); return GetProperty(schemaNS, fieldPath); }
public virtual bool DoesStructFieldExist(String schemaNS, String structName, String fieldNS, String fieldName) { try { // fieldNS and fieldName are checked inside composeStructFieldPath() ParameterAsserts.AssertSchemaNS(schemaNS); ParameterAsserts.AssertStructName(structName); String path = XMPPathFactory.ComposeStructFieldPath(fieldNS, fieldName); return DoesPropertyExist(schemaNS, structName + path); } catch (XMPException) { return false; } }
public virtual void DeleteStructField(String schemaNS, String structName, String fieldNS, String fieldName) { try { // fieldNS and fieldName are checked inside composeStructFieldPath ParameterAsserts.AssertSchemaNS(schemaNS); ParameterAsserts.AssertStructName(structName); String fieldPath = structName + XMPPathFactory.ComposeStructFieldPath(fieldNS, fieldName ); DeleteProperty(schemaNS, fieldPath); } catch (XMPException) { // EMPTY, exceptions within delete are ignored } }