use of com.mucommander.commons.util.xml.XmlAttributes in project mucommander by mucommander.
the class BookmarkWriter method startBookmarks.
public void startBookmarks() throws BookmarkException {
// Root element
try {
// Version the file.
// Note: the version attribute was introduced in muCommander 0.8.4.
XmlAttributes attributes = new XmlAttributes();
attributes.add("version", RuntimeConstants.VERSION);
out.startElement(ELEMENT_ROOT, attributes);
out.println();
} catch (IOException e) {
throw new BookmarkException(e);
}
}
use of com.mucommander.commons.util.xml.XmlAttributes in project mucommander by mucommander.
the class AssociationWriter method setIsReadable.
public void setIsReadable(boolean isReadable) throws CommandException {
XmlAttributes attr;
attr = new XmlAttributes();
attr.add(ATTRIBUTE_VALUE, isReadable ? VALUE_TRUE : VALUE_FALSE);
try {
out.writeStandAloneElement(ELEMENT_IS_READABLE, attr);
} catch (IOException e) {
throw new CommandException(e);
}
}
use of com.mucommander.commons.util.xml.XmlAttributes in project mucommander by mucommander.
the class AssociationWriter method startAssociation.
public void startAssociation(String command) throws CommandException {
XmlAttributes attr;
attr = new XmlAttributes();
attr.add(ATTRIBUTE_COMMAND, command);
try {
out.startElement(ELEMENT_ASSOCIATION, attr);
out.println();
} catch (IOException e) {
throw new CommandException(e);
}
}
use of com.mucommander.commons.util.xml.XmlAttributes in project mucommander by mucommander.
the class AssociationWriter method setMask.
public void setMask(String mask, boolean isCaseSensitive) throws CommandException {
XmlAttributes attr;
attr = new XmlAttributes();
attr.add(ATTRIBUTE_VALUE, mask);
if (!isCaseSensitive)
attr.add(ATTRIBUTE_CASE_SENSITIVE, VALUE_FALSE);
try {
out.writeStandAloneElement(ELEMENT_MASK, attr);
} catch (IOException e) {
throw new CommandException(e);
}
}
use of com.mucommander.commons.util.xml.XmlAttributes in project mucommander by mucommander.
the class AssociationWriter method setIsExecutable.
public void setIsExecutable(boolean isExecutable) throws CommandException {
XmlAttributes attr;
attr = new XmlAttributes();
attr.add(ATTRIBUTE_VALUE, isExecutable ? VALUE_TRUE : VALUE_FALSE);
try {
out.writeStandAloneElement(ELEMENT_IS_EXECUTABLE, attr);
} catch (IOException e) {
throw new CommandException(e);
}
}
Aggregations