/**
*
*/
protected void register() {
try {
XRegistryAccesser xregistryAccesser = new XRegistryAccesser(
this.engine);
StringBuffer fileData = new StringBuffer(1000);
BufferedReader reader = new BufferedReader(new FileReader(
this.fileLocationField.getText()));
char[] buf = new char[1024];
int numRead = 0;
while ((numRead = reader.read(buf)) != -1) {
String readData = String.valueOf(buf, 0, numRead);
fileData.append(readData);
buf = new char[1024];
}
reader.close();
if (this.docTypeComboBox.getText().equals("Host")) {
xregistryAccesser.registerHost(fileData.toString());
} else if (this.docTypeComboBox.getText().equals("Application")) {
xregistryAccesser.registerApplication(fileData.toString());
} else {
xregistryAccesser.registerService(fileData.toString());
}
JOptionPane.showMessageDialog(RegisterThroughFileWindow.this.dialog
.getDialog(), this.docTypeComboBox.getText()
+ " description registered successfully", "Successfully",