|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.io.Dsmlv1Writer
public class Dsmlv1Writer
Writes a SearchResult as DSML version 1 to a Writer.
| Constructor Summary | |
|---|---|
Dsmlv1Writer(Writer writer)
Creates a new dsml writer. |
|
| Method Summary | |
|---|---|
protected Element |
createAttrElement(Document doc,
LdapAttribute attr)
Returns a |
protected Document |
createDsml(SearchResult result)
Creates DSML that corresponds to the supplied search result. |
protected List<Element> |
createDsmlAttributes(Document doc,
Collection<LdapAttribute> attrs)
Returns a list of |
protected Element |
createObjectclassElement(Document doc,
LdapAttribute attr)
Returns a |
Map<String,String> |
getOutputProperties()
Returns the transformer output properties used by this writer. |
protected void |
setAttrValue(Document doc,
Element valueElement,
String value,
boolean isBase64)
Adds the supplied string to the value element. |
void |
setOutputProperties(Map<String,String> properties)
Sets the transformer output properties used by this writer. |
void |
write(SearchResult result)
Writes the supplied search result to the writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dsmlv1Writer(Writer writer)
writer - to write DSML to| Method Detail |
|---|
public Map<String,String> getOutputProperties()
public void setOutputProperties(Map<String,String> properties)
properties - transformer output properties
public void write(SearchResult result)
throws IOException
write in interface SearchResultWriterresult - search result to write
IOException - if an error occurs using the writer
protected Document createDsml(SearchResult result)
throws ParserConfigurationException
result - search result to parse
ParserConfigurationException - if a document builder cannot be
created
protected List<Element> createDsmlAttributes(Document doc,
Collection<LdapAttribute> attrs)
doc - to source elements fromattrs - to iterate over
protected Element createAttrElement(Document doc,
LdapAttribute attr)
doc - to source elements fromattr - ldap attribute to add
protected Element createObjectclassElement(Document doc,
LdapAttribute attr)
doc - to source elements fromattr - ldap attribute to add
protected void setAttrValue(Document doc,
Element valueElement,
String value,
boolean isBase64)
doc - to create nodes withvalueElement - to append value tovalue - to create node forisBase64 - whether the value is base64 encoded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||