⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xcal.java

📁 Java p2p程序设计2002年版
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
        }                    }// end of processMessage()    public void processMessage( org.jdom.Element element){        //veventTag        organizer = getText(element.getChild(organizerTag));        uid = getText(element.getChild(uidTag));        dtstamp = getText(element.getChild(dtstampTag));        summary = getText(element.getChild(summaryTag));        location = getText(element.getChild(locationTag));        dtstart = getText(element.getChild(dtstartTag));        dtend = getText(element.getChild(dtendTag));        organizer = getText(element.getChild(organizerTag));        note = getText(element.getChild(noteTag));                List categories = (List)element.getChildren(categoriesTag);        ArrayList items = new ArrayList();        ListIterator iterator = categories.listIterator();        while(iterator.hasNext()){            items.add( getText((org.jdom.Element)iterator.next()));        }        // copy the items.        category = items;        List categoryList = (List)element.getChildren(attendeeTag);        items = new ArrayList();        iterator = categoryList.listIterator();        while(iterator.hasNext()){            org.jdom.Element person = (org.jdom.Element)iterator.next();            items.add( new Attendee(getText(person),getText(person.getAttribute("role")),getText(person.getAttribute("rsvp") )) );        }        attendee = items;    }    protected String getText(org.jdom.Element element) {        if (element == null){            return "";        }else{            return element.getText();        }    }    protected String getText(org.jdom.Attribute attribute) {        if (attribute == null){            return "";        }else{            return attribute.getValue();        }    }        protected String getText(Node node) {        org.w3c.dom.Text t = (org.w3c.dom.Text) node.getFirstChild();                if (t == null)            return "";        else            return t.getData();    }        /** Getter for property attendee.     * @return Value of property attendee.     */    public Object[] getAttendee() {        return this.attendee.toArray();    }        /** Setter for property attendee.     * @param attendee New value of property attendee.     */    public void setAttendee(Attendee[] attendee) {        this.attendee = new ArrayList(attendee.length);        for (int i =0;i<attendee.length;i++){            this.attendee.add(attendee[i]);         }            }            /** Getter for property category.     * @return Value of property category.     */    public Object[] getCategory() {        return this.category.toArray();    }        /** Setter for property category.     * @param category New value of property category.     */    public void setCategory(String[] category) {        this.category = new ArrayList(category.length);        for (int i =0;i<category.length;i++){            this.category.add(category[i]);         }                }        /** Getter for property changed.     * @return Value of property changed.     */    public boolean isChanged() {        return this.changed;    }        /** Setter for property changed.     * @param changed New value of property changed.     */    public void setChanged(boolean changed) {        this.changed = changed;    }        /** Getter for property dtend.     * @return Value of property dtend.     */    public String getDtend() {        return this.dtend;    }        /** Setter for property dtend.     * @param dtend New value of property dtend.     */    public void setDtend(String dtend) {        this.dtend = dtend;    }        /** Getter for property dtstamp.     * @return Value of property dtstamp.     */    public String getDtstamp() {        return this.dtstamp;    }        /** Setter for property dtstamp.     * @param dtstamp New value of property dtstamp.     */    public void setDtstamp(String dtstamp) {        this.dtstamp = dtstamp;    }        /** Getter for property dtstart.     * @return Value of property dtstart.     */    public String getDtstart() {        return this.dtstart;    }        /** Setter for property dtstart.     * @param dtstart New value of property dtstart.     */    public void setDtstart(String dtstart) {        this.dtstart = dtstart;    }            /** Getter for property location.     * @return Value of property location.     */    public String getLocation() {        return this.location;    }        /** Setter for property location.     * @param location New value of property location.     */    public void setLocation(String location) {        this.location = location;    }        /** Getter for property method.     * @return Value of property method.     */    public String getMethod() {        return this.method;    }        /** Setter for property method.     * @param method New value of property method.     */    public void setMethod(String method) {        this.method = method;    }        /** Getter for property note.     * @return Value of property note.     */    public String getNote() {        return this.note;    }        /** Setter for property note.     * @param note New value of property note.     */    public void setNote(String note) {        this.note = note;    }        /** Getter for property organizer.     * @return Value of property organizer.     */    public String getOrganizer() {        return this.organizer;    }        /** Setter for property organizer.     * @param organizer New value of property organizer.     */    public void setOrganizer(String organizer) {        this.organizer = organizer;    }            /** Getter for property summary.     * @return Value of property summary.     */    public String getSummary() {        return this.summary;    }        /** Setter for property summary.     * @param summary New value of property summary.     */    public void setSummary(String summary) {        this.summary = summary;    }        /** Getter for property uid.     * @return Value of property uid.     */    public String getUid() {        return this.uid;    }        /** Setter for property uid.     * @param uid New value of property uid.     */    public void setUid(String uid) {        this.uid = uid;    }        /** Getter for property vCardAddrType.     * @return Value of property vCardAddrType.     */    public String getVCardAddrType() {        return this.vCardAddrType;    }        /** Setter for property vCardAddrType.     * @param vCardAddrType New value of property vCardAddrType.     */    public void setVCardAddrType(String vCardAddrType) {        this.vCardAddrType = vCardAddrType;    }        /** Getter for property vCardURI.     * @return Value of property vCardURI.     */    public String getVCardURI() {        return this.vCardURI;    }        /** Setter for property vCardURI.     * @param vCardURI New value of property vCardURI.     */    public void setVCardURI(String vCardURI) {        this.vCardURI = vCardURI;    }        /** Getter for property versionAttr.     * @return Value of property versionAttr.     */    public String getVersionAttr() {        return this.versionAttr;    }        /** Setter for property versionAttr.     * @param versionAttr New value of property versionAttr.     */    public void setVersionAttr(String versionAttr) {        this.versionAttr = versionAttr;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -