📄 contact.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: Contact.java
package org.huihoo.openweb.uddi;
import java.io.PrintStream;
import java.util.Enumeration;
import java.util.Vector;
// Referenced classes of package org.huihoo.openweb.uddi:
// UddiObject, UDDIXmlException, ContactPhone, ContactEmail,
// ContactAddress
public class Contact extends UddiObject
{
public Contact(String personName)
{
super("contact");
setPersonName(personName);
}
public Contact(UddiObject o)
{
doc = o.doc;
}
public void setPersonName(String name)
{
UddiObject curr = new UddiObject("personName");
curr.setValue(name);
addElement(curr);
}
public String getPersonName()
throws UDDIXmlException
{
UddiObject o = getElement("personName");
return o.getValue();
}
public void setUseType(String useType)
{
setAttribute("useType", useType);
}
public String getUseType()
{
return getAttribute("useType");
}
public void setDescription(String desc)
{
UddiObject curr = new UddiObject("description");
curr.setValue(desc);
addElement(curr);
}
public String getDescription()
throws UDDIXmlException
{
UddiObject el = getElement("description");
System.out.println("at this");
String desc = "";
if(el != null)
desc = el.getValue();
return desc;
}
public void setPhone(ContactPhone phone)
{
addElement(phone);
}
public Enumeration getPhone()
throws UDDIXmlException
{
Vector v = new Vector();
Enumeration e = getElementsNamed("phone");
if(e != null)
{
ContactPhone bt;
for(; e.hasMoreElements(); v.addElement(bt))
bt = new ContactPhone((UddiObject)e.nextElement());
return v.elements();
} else
{
return null;
}
}
public void setEmail(ContactEmail email)
{
addElement(email);
}
public ContactEmail getEmail()
throws UDDIXmlException
{
Enumeration e = getElementsNamed("email");
if(e != null)
return new ContactEmail(getElement("email"));
else
return null;
}
public void setAddress(ContactAddress address)
{
addElement(address);
}
public ContactAddress getAddress()
throws UDDIXmlException
{
UddiObject add = getElement("address");
if(add != null)
return new ContactAddress(add);
else
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -