Package com.opengamma.id

Examples of com.opengamma.id.ExternalIdWithDates


    info.setName("Test");
    info.setDataField("DF");
    info.setDataSource("DS");
    info.setDataProvider("DP");
    info.setObservationTime("OT");
    ExternalIdWithDates id = ExternalIdWithDates.of(ExternalId.of("A", "B"), LocalDate.of(2011, 6, 30), null);
    ExternalIdBundleWithDates bundle = ExternalIdBundleWithDates.of(id);
    info.setExternalIdBundle(bundle);
    HistoricalTimeSeriesInfoDocument doc = new HistoricalTimeSeriesInfoDocument(info);
    _htsMaster.add(doc);
  }
View Full Code Here


    info.setName("Updated");
    info.setDataField("DF");
    info.setDataSource("DS");
    info.setDataProvider("DP");
    info.setObservationTime("OT");
    ExternalIdWithDates id = ExternalIdWithDates.of(ExternalId.of("A", "B"), LocalDate.of(2011, 6, 30), null);
    ExternalIdBundleWithDates bundle = ExternalIdBundleWithDates.of(id);
    info.setExternalIdBundle(bundle);
    HistoricalTimeSeriesInfoDocument doc = new HistoricalTimeSeriesInfoDocument(info);
    _htsMaster.update(doc);
  }
View Full Code Here

    info.setName("Updated");
    info.setDataField("DF");
    info.setDataSource("DS");
    info.setDataProvider("DP");
    info.setObservationTime("OT");
    ExternalIdWithDates id = ExternalIdWithDates.of(ExternalId.of("A", "B"), LocalDate.of(2011, 6, 30), null);
    ExternalIdBundleWithDates bundle = ExternalIdBundleWithDates.of(id);
    info.setExternalIdBundle(bundle);
    HistoricalTimeSeriesInfoDocument doc = new HistoricalTimeSeriesInfoDocument(info);
    _htsMaster.update(doc);
  }
View Full Code Here

    info.setName("Updated");
    info.setDataField("DF");
    info.setDataSource("DS");
    info.setDataProvider("DP");
    info.setObservationTime("OT");
    ExternalIdWithDates id = ExternalIdWithDates.of(ExternalId.of("A", "B"), LocalDate.of(2011, 6, 30), null);
    ExternalIdBundleWithDates bundle = ExternalIdBundleWithDates.of(id);
    info.setExternalIdBundle(bundle);
    HistoricalTimeSeriesInfoDocument doc = new HistoricalTimeSeriesInfoDocument(info);
    _htsMaster.update(doc);
  }
View Full Code Here

    info.setName("Updated");
    info.setDataField("DF");
    info.setDataSource("DS");
    info.setDataProvider("DP");
    info.setObservationTime("OT");
    ExternalIdWithDates id = ExternalIdWithDates.of(ExternalId.of("A", "B"), LocalDate.of(2011, 6, 30), null);
    ExternalIdBundleWithDates bundle = ExternalIdBundleWithDates.of(id);
    info.setExternalIdBundle(bundle);
    HistoricalTimeSeriesInfoDocument input = new HistoricalTimeSeriesInfoDocument(info);
   
    HistoricalTimeSeriesInfoDocument updated = _htsMaster.update(input);
View Full Code Here

    info.setName("Updated");
    info.setDataField("DF");
    info.setDataSource("DS");
    info.setDataProvider("DP");
    info.setObservationTime("OT");
    ExternalIdWithDates id = ExternalIdWithDates.of(ExternalId.of("A", "B"), LocalDate.of(2011, 6, 30), null);
    ExternalIdBundleWithDates bundle = ExternalIdBundleWithDates.of(id);
    info.setExternalIdBundle(bundle);
    HistoricalTimeSeriesInfoDocument input = new HistoricalTimeSeriesInfoDocument(info);
    try {
      w.update(input);
View Full Code Here

    info.setName(dataField + " " + identifier);
    info.setDataField(dataField);
    info.setDataSource(OG_DATA_SOURCE);
    info.setDataProvider(OG_DATA_PROVIDER);
    info.setObservationTime(HistoricalTimeSeriesConstants.LONDON_CLOSE);
    final ExternalIdWithDates id = ExternalIdWithDates.of(identifier, null, null);
    final ExternalIdBundleWithDates bundle = ExternalIdBundleWithDates.of(id);
    info.setExternalIdBundle(bundle);
    return info;
  }
View Full Code Here

   */
  private ExternalIdBundleWithDates parseIdentifiers(FudgeMsg fieldData) {
    ArgumentChecker.notNull(fieldData, "fieldData");
   
    final Set<ExternalIdWithDates> identifiers = new HashSet<ExternalIdWithDates>();
    ExternalIdWithDates buid = makeBuidIdentifier(fieldData);
    if (buid != null) {
      identifiers.add(buid);
    }
    ExternalIdWithDates cusip = makeCusipIdentifier(fieldData);
    if (cusip != null) {
      identifiers.add(cusip);
    }
    ExternalIdWithDates isin = makeIsinIdentifier(fieldData);
    if (isin != null) {
      identifiers.add(isin);
    }
    ExternalIdWithDates sedol1 = makeSedol1Identifier(fieldData);
    if (sedol1 != null) {
      identifiers.add(sedol1);
    }
    ExternalIdWithDates ticker = makeTickerIdentifier(fieldData);
    if (ticker != null) {
      identifiers.add(ticker);
    }
    return identifiers.isEmpty() null : new ExternalIdBundleWithDates(identifiers);
  }
View Full Code Here

   *
   * @param fieldData  the Bloomberg field data, not null
   * @return the identifier, null if not found
   */
  private ExternalIdWithDates makeTickerIdentifier(FudgeMsg fieldData) {
    ExternalIdWithDates result = null;
    if (fieldData != null) {
      final String securityType = fieldData.getString(FIELD_SECURITY_TYPE);
      if (securityType != null) {
        if (securityType.contains("GOVERNMENT")) {
          return result;
View Full Code Here

        final String idScheme = rs.getString("KEY_SCHEME");
        final String idValue = rs.getString("KEY_VALUE");
        if (idScheme != null && idValue != null) {
          final LocalDate validFrom = DbDateUtils.fromSqlDateNullFarPast(rs.getDate("KEY_VALID_FROM"));
          final LocalDate validTo = DbDateUtils.fromSqlDateNullFarFuture(rs.getDate("KEY_VALID_TO"));
          ExternalIdWithDates id = ExternalIdWithDates.of(ExternalId.of(idScheme, idValue), validFrom, validTo);
          _info.setExternalIdBundle(_info.getExternalIdBundle().withExternalId(id));
        }
      }
      return _documents;
    }
View Full Code Here

TOP

Related Classes of com.opengamma.id.ExternalIdWithDates

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.