public DateTime getReleaseDate(Entry entry) { DateTime releaseDate = null; Source source = entry.getSource(); if (source != null) { releaseDate = new DateTime(source.getReleaseDate()); } return releaseDate; }
public Entry enrichEntry(Entry entry, EnricherConfig config) { EntryConverter converter = new EntryConverter(); IntactEntry intactEntry = converter.psiToIntact(entry); enricherContext.setConfig(config); intactEntryEnricher.enrich(intactEntry); Entry enrichedEntry = converter.intactToPsi(intactEntry); enrichedEntry.getSource().setReleaseDate(entry.getSource().getReleaseDate()); return enrichedEntry; }
/** * Convert network metadata to CyNetwork table data. * * @param entry */ private void mapNetworkMetaData(final Entry entry) { final CyTable networkTable = network.getDefaultNetworkTable(); final Collection<Attribute> attrs = entry.getAttributes(); final Collection<ExperimentDescription> exp = entry.getExperiments(); // TODO: this takes very long time for some data sets. //mapExperiments(exp, networkTable); // Source is always unique final Source source = entry.getSource(); mapSource(source, networkTable); entry.getAvailabilities(); }
public IntactEntry psiToIntact(Entry psiObject) { psiStartConversion(psiObject); Institution institution = institutionConverter.psiToIntact(psiObject.getSource()); setInstitution(institution); Collection<Interaction> interactions = new ArrayList<Interaction>(); for (psidev.psi.mi.xml.model.Interaction psiInteraction : psiObject.getInteractions()) { Interaction interaction = interactionConverter.psiToIntact(psiInteraction); interactions.add(interaction); } IntactEntry ientry = new IntactEntry(interactions); ientry.setInstitution(getInstitution()); IntactConverterUtils.populateAnnotations(psiObject, ientry, institution, this.annotationConverter); if (psiObject.getSource().getReleaseDate() != null) { ientry.setReleasedDate(psiObject.getSource().getReleaseDate()); } ConversionCache.clear(); psiEndConversion(psiObject); ConverterContext.getInstance().getLocation().resetPosition(); failIfInconsistentConversion(ientry, psiObject); return ientry; }
final Provenance pro = createProvenance(entry.getSource());
Source source = entry.getSource(); if (source.hasNames()) { Names names = source.getNames(); creationDate.add(entry.getSource().getReleaseDate()); if (!creationDate.isEmpty()) { binaryInteraction.setCreationDate(creationDate); creationDate.add(entry.getSource().getReleaseDate()); if (!creationDate.isEmpty()) { binaryInteraction.setCreationDate(creationDate);
entry.getSource().setReleaseDate(intactObject.getReleasedDate());
jEntry.setSource( sourceConverter.toJaxb( mEntry.getSource() ) );
jEntry.setSource( sourceConverter.toJaxb( mEntry.getSource() ) );