public void Encode(OutputStream output, Indentation indenter) { var @out = new PrintStream(output); @out.PrintLine(indenter + "<Request"); indenter.Down(); IEnumerator itr = this._otherattributes.Keys.GetEnumerator(); while (itr.MoveNext()) { var name = (string)itr.Current; @out.PrintLine(indenter + name + "=\"" + this._otherattributes[name] + "\""); } @out.PrintLine(indenter + "ReturnPolicyIdList=" + "\"" + this._returnPolicyIdList.Encode() + "\""); @out.PrintLine(indenter + "CombinedDecision=" + "\"" + this._combinedDecision.Encode() + "\">"); foreach (RequestDefaults r in this._requestDefaults) { r.Encode(output, indenter); } foreach (MultiRequests m in this._multiRequests) { m.Encode(output, indenter); } foreach (Attributes a in this._attributes) { a.Encode(output, indenter); } indenter.Up(); @out.PrintLine(indenter + "</Request>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<Result>"); indenter.Down(); this._decision.Encode(output, indenter); if (this._status != null) { this._status.Encode(output, indenter); } if (this._obligations != null) { this._obligations.Encode(output, indenter); } if (this._associatedAdvices != null) { this._associatedAdvices.Encode(output, indenter); } if (this._policyIdentifierList != null) { this._policyIdentifierList.Encode(output, indenter); } foreach (Attributes attrs in this._attributes) { attrs.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</Result>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine( indenter + "<Rule RuleId=\"" + this._ruleId.Encode() + "\" Effect=\"" + this._effect + "\">"); if (this._isRuleReference == false) { indenter.Down(); if (this._description != null) { this._description.Encode(output, indenter); } if (this._target != null) { this._target.Encode(output, indenter); } if (this._condition != null) { this._condition.Encode(output, indenter); } if (this._obligationExpressions != null) { this._obligationExpressions.Encode(output, indenter); } if (this._adviceExpressions != null) { this._adviceExpressions.Encode(output, indenter); } indenter.Up(); } psout.PrintLine(indenter + "</Rule>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); var buf = new StringBuilder(); buf.Append(indenter.ToString()); buf.Append("<AttributeAssignment AttributeId=\""); buf.Append(this._attributeId); buf.Append("\" "); if (this._category != null) { buf.Append("Category=\""); buf.Append(this._category); buf.Append("\" "); } if (this._issuer != null) { buf.Append("Issuer=\""); buf.Append(this._issuer); buf.Append("\" "); } buf.Append(">"); psout.PrintLine(buf); indenter.Down(); this._value.Encode(output, indenter); indenter.Up(); psout.PrintLine(indenter + "</AttributeAssignment>"); }
private void EncodeChild(Node node, PrintStream psout, Indentation indenter) { psout.Print(indenter + "<" + node.NodeName); NamedNodeMap attrs = this._node.Attributes; for (int i = 0; i < attrs.Length; i++) { Node attr = attrs.Item(i); psout.Print(" " + attr.NodeName + "=\"" + attr.NodeValue + "\" "); } psout.Print("> "); psout.PrintLine(); indenter.Down(); NodeList children = node.ChildNodes; for (int i = 0; i < children.Length; i++) { Node child = children.Item(i); if (child.NodeType == Node.ELEMENT_NODE) { this.EncodeChild(child, psout, indenter); } else { string txt = child.TextContent.Trim(); if (txt.Length > 0) { psout.PrintLine(indenter + txt); } } } indenter.Up(); psout.PrintLine(indenter + "</" + node.NodeName + ">"); }
public void Encode(OutputStream output, Indentation indenter) { var str = new StringBuilder(); var psout = new PrintStream(output); str.Append(indenter.ToString()); str.Append("<Policy PolicyId=\""); str.Append(this._policyId); str.Append("\" "); str.Append("Version=\""); str.Append(this._version); str.Append("\" "); str.Append("RuleCombiningAlgId=\""); str.Append(this._ruleCombiningAlgId); str.Append("\" "); if (this._maxDelegationDepth != null) { str.Append("MaxDelegationDepth=\""); str.Append(this._maxDelegationDepth); str.Append("\" "); } str.Append(">"); psout.PrintLine(str.ToString()); indenter.Down(); foreach (VariableDefinition var in this._variableDefinitions.Values) { var.Encode(output, indenter); } this._target.Encode(output, indenter); if (this._policyDefaults != null) { this._policyDefaults.Encode(output, indenter); } if (this._description != null) { this._description.Encode(output, indenter); } if (this._policyIssuer != null) { this._policyIssuer.Encode(output, indenter); } foreach (IPolicyLanguageModel o in this._policyLanguageModels) { o.Encode(output, indenter); } if (this._obligationExpressions != null) { this._obligationExpressions.Encode(output, indenter); } if (this._adviceExpressions != null) { this._adviceExpressions.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</Policy>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<CombinerParameter ParameterName=\"" + this._parameterName + "\" >"); indenter.Down(); this._attributeValue.Encode(output, indenter); indenter.Up(); psout.PrintLine(indenter + "</CombinerParameter>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<Condition>"); indenter.Down(); this._evaluatable.Encode(output, indenter); indenter.Up(); psout.PrintLine(indenter + "</Condition>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<VariableDefinition VariableId=\"" + this._variableId + "\">"); indenter.Down(); this._evaluatable.Encode(output, indenter); indenter.Up(); psout.PrintLine(indenter + "</VariableDefinition>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<Match MatchId=\"" + this._matchId.Encode() + "\">"); indenter.Down(); this._attributeValue.Encode(output, indenter); this._evaluatable.Encode(output, indenter); indenter.Up(); psout.PrintLine(indenter + "</Match>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<AllOf>"); indenter.Down(); foreach (object o in this._matchs) { ((Match)o).Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</AllOf>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine("<StatusCode Value=\"" + this._value + "\" "); indenter.Down(); foreach (StatusCode s in this._minorStatusCode) { s.Encode(output, indenter); } indenter.Up(); psout.PrintLine("</StatusCode"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<MultiRequests>"); indenter.Down(); foreach (RequestReference r in this._requestReferences) { r.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</MultiRequests>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<PolicyIdentifierList>"); indenter.Down(); foreach (IElement element in this._referenceList) { element.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</PolicyIdentifierList>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<Obligations>"); indenter.Down(); foreach (Obligation o in this._obligations) { o.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</Obligations>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<RequestReference>"); indenter.Down(); foreach (AttributesReference a in this._AttributesReferences) { a.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</RequestReference>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<Advice AdviceId=\"" + this.AdviceId + "\">"); indenter.Down(); foreach (AttributeAssignment a in this._attributeAssignments) { a.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</Advice>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<AssociatedAdvice>"); indenter.Down(); foreach (Advice advice in this._Advices) { advice.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</AssociatedAdvice>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<PolicySetDefaults>"); indenter.Down(); if (this._xPathVersion != null) { this._xPathVersion.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</PolicySetDefaults>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<AdviceExpressions>"); indenter.Down(); foreach (AdviceExpression o in this._adviceExpressions) { o.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</AdviceExpressions>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine( indenter + "<AdviceExpression AdviceId=\"" + this._adviceId + "\" AppliesTo=\"" + this._appliesTo + "\">"); indenter.Down(); foreach (AttributeAssignmentExpression o in this._attributeAssignmentExpressions) { o.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</AdviceExpression>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<Apply FunctionId=\"" + this._functionId + "\">"); indenter.Down(); if (this._description != null) { this._description.Encode(output, indenter); } foreach (IEvaluatable e in this._evaluatable) { e.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</Apply>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<Attributes Category=\"" + this._category.Encode() + "\"> "); indenter.Down(); if (this._content != null) { this._content.Encode(output, indenter); } foreach (Attribute attr in this._attributes) { attr.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</Attributes>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<Status>"); indenter.Down(); this._statusCode.Encode(output, indenter); if (this._statusMessage != null) { this._statusMessage.Encode(output, indenter); } if (this._statusDetail != null) { this._statusDetail.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</Status>"); }
public void Encode(OutputStream output, Indentation indenter) { var @out = new PrintStream(output); @out.PrintLine(indenter + "<PolicyIssuer>"); indenter.Down(); if (this._content != null) { this._content.Encode(output, indenter); } foreach (Attribute a in this._attributes) { a.Encode(output, indenter); } indenter.Up(); @out.PrintLine(indenter + "</PolicyIssuer>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<ObligationExpression ObligationId=\"" + this._obligationId + "\""); if (this._fulfillOn != null) { psout.PrintLine(indenter + " FulfillOn=\"" + this._fulfillOn + "\""); } psout.PrintLine(indenter + ">"); indenter.Down(); foreach (AttributeAssignmentExpression attr in this._attributeAssignmentExpressions) { attr.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</ObligationExpression>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<PolicySet PolicySetId=\"" + this._policySetId + "\""); psout.PrintLine(indenter + "Version=\"" + this._version + "\""); psout.PrintLine(indenter + "PolicyCombiningAlgId=\"" + this._policyCombiningAlgId + "\""); if (this._maxDelegationDepth >= 0) { psout.PrintLine(indenter + "MaxDelegationDepth=\"" + this._maxDelegationDepth + "\""); } psout.PrintLine(indenter + ">"); indenter.Down(); if (this._description != null) { this._description.Encode(output, indenter); } this._target.Encode(output, indenter); if (this._policyIssuer != null) { this._policyIssuer.Encode(output, indenter); } if (this._policySetDefaults != null) { this._policySetDefaults.Encode(output, indenter); } foreach (IPolicyLanguageModel eval in this._policies) { eval.Encode(output, indenter); } if (this._obligationExpressions != null) { this._obligationExpressions.Encode(output, indenter); } if (this._adviceExpressions != null) { this._adviceExpressions.Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</PolicySet>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); psout.PrintLine(indenter + "<AttributeAssignmentExpression AttributeId=\"" + this._attributeId + "\""); if (this._category != null) { psout.PrintLine(indenter + " Category=\"" + this._category + "\""); } if (this._issuer != null) { psout.PrintLine(indenter + " Issuer=\"" + this._issuer + "\""); } psout.PrintLine(indenter + ">"); indenter.Down(); this._evaluatable.Encode(output, indenter); indenter.Up(); psout.PrintLine(indenter + "</AttributeAssignmentExpression>"); }
public void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); if (this._combinerParameters.Count == 0) { psout.PrintLine(indenter + "<CombinerParameters />"); } else { psout.PrintLine(indenter + "<CombinerParameters>"); indenter.Down(); foreach (object o in this._combinerParameters) { ((CombinerParameter)o).Encode(output, indenter); } indenter.Up(); psout.PrintLine(indenter + "</CombinerParameters>"); } }
public virtual void Encode(OutputStream output, Indentation indenter) { var psout = new PrintStream(output); if (this.ReturnIsBag()) { foreach (object o in this.Children) { ((DataTypeValue)o).Encode(output, indenter); } } else { psout.PrintLine(indenter + "<AttributeValue DataType=\"" + this._uri + "\">"); indenter.Down(); psout.PrintLine(indenter + this.Encode()); indenter.Up(); psout.PrintLine((indenter + "</AttributeValue>")); } }