• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java CopyFrom类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.rometools.rome.feed.CopyFrom的典型用法代码示例。如果您正苦于以下问题:Java CopyFrom类的具体用法?Java CopyFrom怎么用?Java CopyFrom使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

CopyFrom类属于com.rometools.rome.feed包,在下文中一共展示了CopyFrom类的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: copyFrom

点赞 3

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom o) {
    final YWeatherModuleImpl from = (YWeatherModuleImpl) o;
    setAstronomy(from.getAstronomy() != null ? (Astronomy) from.getAstronomy().clone() : null);
    setCondition(from.getCondition() != null ? (Condition) from.getCondition().clone() : null);
    setLocation(from.getLocation() != null ? (Location) from.getLocation().clone() : null);
    setUnits(from.getUnits() != null ? (Units) from.getUnits().clone() : null);
    setWind(from.getWind() != null ? (Wind) from.getWind().clone() : null);

    setAtmosphere(from.getAtmosphere() != null ? (Atmosphere) from.getAtmosphere().clone() : null);

    if (from.getForecasts() != null) {
        forecasts = new Forecast[from.forecasts.length];

        for (int i = 0; i < from.forecasts.length; i++) {
            forecasts[i] = from.forecasts[i] != null ? (Forecast) from.forecasts[i].clone() : null;
        }
    } else {
        forecasts = null;
    }
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:22,
代码来源:YWeatherModuleImpl.java

示例2: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(CopyFrom obj) {
	MerlotTopLevelModule other = (MerlotTopLevelModule) obj;
	totalCount = other.getTotalCount();
	resultCount = other.getResultCount();
	lastRecNumber = other.getLastRecNumber();		
}
 

开发者ID:equella,
项目名称:Equella,
代码行数:8,
代码来源:MerlotTopLevelModuleImpl.java

示例3: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(CopyFrom obj)
{
	MerlotModule other = (MerlotModule) obj;
	title = other.getTitle();
	url = other.getUrl();
}
 

开发者ID:equella,
项目名称:Equella,
代码行数:8,
代码来源:MerlotModuleImpl.java

示例4: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom obj) {
    final OpenSearchModule osm = (OpenSearchModule) obj;
    setTotalResults(osm.getTotalResults());
    setItemsPerPage(osm.getItemsPerPage());
    setStartIndex(osm.getStartIndex());
    setLink(osm.getLink());
    for (final OSQuery q : osm.getQueries()) {
        try {
            getQueries().add((OSQuery) q.clone());
        } catch (final CloneNotSupportedException e) {
            LOG.error("Error", e);
        }
    }
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:16,
代码来源:OpenSearchModuleImpl.java

示例5: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom obj) {
    final GeoRSSModule geoRSSModule = (GeoRSSModule) obj;
    geometry = geoRSSModule.getGeometry();
    try {
        geometry = (AbstractGeometry) geometry.clone();
    } catch (final CloneNotSupportedException ex) {
        LOG.error("Error", ex);
    }
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:11,
代码来源:GeoRSSModule.java

示例6: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom obj) {
    MediaEntryModuleImpl other = (MediaEntryModuleImpl) obj;
    other = (MediaEntryModuleImpl) other.clone();
    setMediaContents(other.getMediaContents());
    setMediaGroups(other.getMediaGroups());
    setMetadata(other.getMetadata());
    setPlayer(other.getPlayer());
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:10,
代码来源:MediaEntryModuleImpl.java

示例7: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
/**
 * Required by the ROME API
 *
 * @param obj object to copy property values from
 */
@Override
public void copyFrom(final CopyFrom obj) {
    final FeedInformationImpl info = (FeedInformationImpl) obj;
    setAuthor(info.getAuthor());
    setBlock(info.getBlock());

    getCategories().clear();
    if (info.getCategories() != null) {
        getCategories().addAll(info.getCategories());
    }

    setComplete(info.getComplete());
    setNewFeedUrl(info.getNewFeedUrl());
    setExplicit(info.getExplicit());

    try {
        if (info.getImage() != null) {
            setImage(new URL(info.getImage().toExternalForm()));
        }
    } catch (final MalformedURLException e) {
        LOG.debug("Error copying URL:" + info.getImage(), e);
    }

    if (info.getKeywords() != null) {
        setKeywords(info.getKeywords().clone());
    }

    setOwnerEmailAddress(info.getOwnerEmailAddress());
    setOwnerName(info.getOwnerName());
    setSubtitle(info.getSubtitle());
    setSummary(info.getSummary());
    setType(info.getType());
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:39,
代码来源:FeedInformationImpl.java

示例8: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
/**
 * Defined by the ROME module API
 *
 * @param obj Object to copy from
 */
@Override
public void copyFrom(final CopyFrom obj) {
    final EntryInformationImpl info = (EntryInformationImpl) obj;
    setAuthor(info.getAuthor());
    setBlock(info.getBlock());

    if (info.getDuration() != null) {
        setDuration(new Duration(info.getDuration().getMilliseconds()));
    }

    setExplicit(info.getExplicit());

    try {
        if (info.getImage() != null) {
            setImage(new URL(info.getImage().toExternalForm()));
        }
    } catch (final MalformedURLException e) {
        LOG.debug("Error copying URL:" + info.getImage(), e);
    }

    if (info.getKeywords() != null) {
        setKeywords(info.getKeywords().clone());
    }

    setSubtitle(info.getSubtitle());
    setSummary(info.getSummary());
    setClosedCaptioned(info.getClosedCaptioned());
    setOrder(info.getOrder());
    setEpisodeType(info.getEpisodeType());
    setSeason(info.getSeason());
    setEpisode(info.getEpisode());
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:38,
代码来源:EntryInformationImpl.java

示例9: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(CopyFrom obj) {
    AtomLinkModule other = (AtomLinkModule) obj;
    List<Link> links = other.getLinks();
    for (Link link : links) {
        Link l = new Link();
        l.setHref(link.getHref());
        l.setType(link.getType());
        l.setRel(link.getRel());
        l.setHreflang(link.getHreflang());
        l.setTitle(link.getTitle());
        l.setLength(link.getLength());
        this.links.add(l);
    }
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:16,
代码来源:AtomLinkModuleImpl.java

示例10: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom obj) {
    final ContentModule cm = (ContentModule) obj;
    setEncodeds(cm.getEncodeds());
    setContentItems(cm.getContentItems());
    setContents(cm.getContents());
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:8,
代码来源:ContentModuleImpl.java

示例11: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom obj) {
    final Conflict conflict = (Conflict) obj;
    conflict.when = when == null ? null : (Date) when.clone();
    conflict.by = by;
    conflict.version = version;
    try {
        conflict.conflictItem = (Item) conflictItem.clone();
    } catch (final CloneNotSupportedException e) {
        // should not happen
        LOG.error("Error", e);
    }
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:14,
代码来源:Conflict.java

示例12: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom other) {
    final Update otherUpdate = (Update) other;
    otherUpdate.when = when == null ? null : (Date) when.clone();
    // dont copy immutable
    otherUpdate.by = by;
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:8,
代码来源:Update.java

示例13: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom obj) {
    final Sharing sharing = (Sharing) obj;
    ordered = sharing.ordered;
    since = sharing.since == null ? null : (Date) sharing.since.clone();
    window = sharing.window;
    until = sharing.until == null ? null : (Date) sharing.until.clone();
    version = sharing.version;
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:10,
代码来源:Sharing.java

示例14: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom obj) {
    final Related related = (Related) obj;
    related.link = link;
    related.since = since == null ? null : (Date) since.clone();
    related.title = title;
    related.type = type;
    related.until = until == null ? null : (Date) until.clone();
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:10,
代码来源:Related.java

示例15: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom obj) {
    final Sync sync = (Sync) obj;
    deleted = sync.deleted;
    version = sync.version;
    conflict = sync.conflict;
    id = sync.id;
    history = sync.history == null ? null : (History) sync.history.clone();
    if (sync.conflicts != null) {
        conflicts = new ArrayList<Conflict>();
        conflicts.addAll(sync.conflicts);
    }
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:14,
代码来源:Sync.java

示例16: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom other) {
    final History otherHistory = (History) other;
    when = otherHistory.when == null ? null : (Date) otherHistory.when.clone();
    // dont copy immutable
    by = otherHistory.by;

    if (otherHistory.updates != null) {
        updates = new ArrayList<Update>();
        updates.addAll(otherHistory.updates);
    }
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:13,
代码来源:History.java

示例17: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom object) {
    final Slash source = (Slash) object;
    setHitParade(arrayCopy(source.getHitParade()));
    setComments(source.getComments());
    setDepartment(source.getDepartment());
    setSection(source.getSection());
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:9,
代码来源:SlashImpl.java

示例18: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom obj) {
    final PhotocastModule pm = (PhotocastModule) obj;
    setPhotoDate(pm.getPhotoDate() == null ? null : (Date) pm.getPhotoDate().clone());
    setCropDate(pm.getCropDate() == null ? null : (Date) pm.getCropDate().clone());
    setImageUrl(pm.getImageUrl());
    setThumbnailUrl(pm.getThumbnailUrl());
    setMetadata(pm.getMetadata());
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:10,
代码来源:PhotocastModuleImpl.java

示例19: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(final CopyFrom object) {
    final FeedBurner source = (FeedBurner) object;
    setAwareness(source.getAwareness());
    setOrigLink(source.getOrigLink());
    setOrigEnclosureLink(source.getOrigEnclosureLink());
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:8,
代码来源:FeedBurnerImpl.java

示例20: createInstance

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
private CopyFrom createInstance(final Class<? extends CopyFrom> interfaceClass) throws Exception {
    if (baseImplMap.get(interfaceClass) == null) {
        return null;
    } else {
        return (CopyFrom) baseImplMap.get(interfaceClass).newInstance();
    }
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:8,
代码来源:CopyFromHelper.java

示例21: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
/** Copy from other module */
@Override
public void copyFrom(final CopyFrom obj) {
    final AppModule m = (AppModule) obj;
    setDraft(m.getDraft());
    setEdited(m.getEdited());
}
 

开发者ID:rometools,
项目名称:rome,
代码行数:8,
代码来源:AppModuleImpl.java

示例22: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
/**
 * Required by the ROME API
 *
 * @param obj object to copy property values from
 */
@Override
public void copyFrom(final CopyFrom obj) {
    final FeedInformationImpl info = (FeedInformationImpl) obj;
    setAuthor(info.getAuthor());
    setBlock(info.getBlock());

    getCategories().clear();
    if (info.getCategories() != null) {
        getCategories().addAll(info.getCategories());
    }

    setComplete(info.getComplete());
    setNewFeedUrl(info.getNewFeedUrl());
    setExplicit(info.getExplicit());

    try {
        if (info.getImage() != null) {
            setImage(new URL(info.getImage().toExternalForm()));
        }
    } catch (final MalformedURLException e) {
        LOG.debug("Error copying URL:" + info.getImage(), e);
    }

    if (info.getKeywords() != null) {
        setKeywords(info.getKeywords().clone());
    }

    setOwnerEmailAddress(info.getOwnerEmailAddress());
    setOwnerName(info.getOwnerName());
    setSubtitle(info.getSubtitle());
    setSummary(info.getSummary());
}
 

开发者ID:rometools,
项目名称:rome-modules,
代码行数:38,
代码来源:FeedInformationImpl.java

示例23: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
/**
 * Defined by the ROME module API
 *
 * @param obj Object to copy from
 */
@Override
public void copyFrom(final CopyFrom obj) {
    final EntryInformationImpl info = (EntryInformationImpl) obj;
    setAuthor(info.getAuthor());
    setBlock(info.getBlock());

    if (info.getDuration() != null) {
        setDuration(new Duration(info.getDuration().getMilliseconds()));
    }

    setExplicit(info.getExplicit());

    try {
        if (info.getImage() != null) {
            setImage(new URL(info.getImage().toExternalForm()));
        }
    } catch (final MalformedURLException e) {
        LOG.debug("Error copying URL:" + info.getImage(), e);
    }

    if (info.getKeywords() != null) {
        setKeywords(info.getKeywords().clone());
    }

    setSubtitle(info.getSubtitle());
    setSummary(info.getSummary());
    setClosedCaptioned(info.getClosedCaptioned());
    setOrder(info.getOrder());
}
 

开发者ID:rometools,
项目名称:rome-modules,
代码行数:35,
代码来源:EntryInformationImpl.java

示例24: copyFrom

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public void copyFrom(CopyFrom obj) {
    AtomLinkModule other = (AtomLinkModule) obj;
    Link link = other.getLink();
    if (link != null) {
        Link l = new Link();
        l.setHref(link.getHref());
        l.setType(link.getType());
        l.setRel(link.getRel());
        l.setHreflang(link.getHreflang());
        l.setTitle(link.getTitle());
        l.setLength(link.getLength());
        setLink(l);
    }
}
 

开发者ID:rometools,
项目名称:rome-modules,
代码行数:16,
代码来源:AtomLinkModuleImpl.java

示例25: getInterface

点赞 2

import com.rometools.rome.feed.CopyFrom; //导入依赖的package包/类
@Override
public Class<? extends CopyFrom> getInterface() {
	return SyndCategory.class;
}
 

开发者ID:equella,
项目名称:Equella,
代码行数:5,
代码来源:FeedServlet.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)