/** * Private helper function to encode the subjects */ private void encodeSubject(Subject subject, PrintStream out, Indenter indenter) { char [] indent = indenter.makeString().toCharArray(); out.print(indent); out.append("<Subject SubjectCategory=\"") .append(subject.getCategory().toString()).append('"'); List subjectAttrs = subject.getAttributesAsList(); if (subjectAttrs.size() == 0) { // there's nothing in this Subject, so just close the tag out.println("/>"); } else { // there's content, so fill it in out.println('>'); encodeAttributes(subjectAttrs, out, indenter); out.print(indent); out.println("</Subject>"); } }
/** * Private helper function to encode the subjects */ private void encodeSubject(Subject subject, PrintStream out, Indenter indenter) { char [] indent = indenter.makeString().toCharArray(); out.print(indent); out.append("<Subject SubjectCategory=\"") .append(subject.getCategory().toString()).append('"'); List subjectAttrs = subject.getAttributesAsList(); if (subjectAttrs.size() == 0) { // there's nothing in this Subject, so just close the tag out.println("/>"); } else { // there's content, so fill it in out.println('>'); encodeAttributes(subjectAttrs, out, indenter); out.print(indent); out.println("</Subject>"); } }
out.append(indenter.makeString()).append("<ResourceContent>") .append(resourceContent).println("</ResourceContent>"); encodeAttributes(resource, out, indenter); out.print(indent); out.println("</Resource>"); out.print(indent); out.println("<Action>"); encodeAttributes(action, out, indenter); out.print(indent); out.println("</Action>"); encodeAttributes(environment, out, indenter);
out.append(indenter.makeString()).append("<ResourceContent>") .append(resourceContent).println("</ResourceContent>"); encodeAttributes(resource, out, indenter); out.print(indent); out.println("</Resource>"); out.print(indent); out.println("<Action>"); encodeAttributes(action, out, indenter); out.print(indent); out.println("</Action>"); encodeAttributes(environment, out, indenter);