Examples of addAttribute()


Examples of com.opengamma.core.position.impl.SimplePortfolio.addAttribute()

      FudgeMsg attributesMsg = message.getMessage(ATTRIBUTES_FIELD_NAME);
      for (FudgeField fudgeField : attributesMsg) {
        String key = fudgeField.getName();
        Object value = fudgeField.getValue();
        if (key != null && value != null) {
          portfolio.addAttribute(key, (String) value);
        }
      }
    }
    return portfolio;
  }

Examples of com.opengamma.core.position.impl.SimplePosition.addAttribute()

      FudgeMsg attributesMsg = message.getMessage(ATTRIBUTES_FIELD_NAME);
      for (FudgeField fudgeField : attributesMsg) {
        String key = fudgeField.getName();
        Object value = fudgeField.getValue();
        if (key != null && value != null) {
          position.addAttribute(key, (String) value);
        }
      }
    }
    readTrades(deserializer, message.getFieldValue(FudgeMsg.class, message.getByName(TRADES_FIELD_NAME)), position);
    return position;

Examples of com.opengamma.core.position.impl.SimpleTrade.addAttribute()

    trade.setPremiumCurrency(Currency.USD);
    trade.setPremiumDate(LocalDate.of(2011, 1, 6));
    trade.setPremiumTime(OffsetTime.parse("15:30+02:00"));
   
    //set attributes
    trade.addAttribute("A", "B");
    trade.addAttribute("C", "D");
    assertEncodeDecodeCycle(Trade.class, trade);
  }
 
  public void testTrade_withPremium() {

Examples of com.opengamma.master.portfolio.ManageablePortfolio.addAttribute()

    ManageablePortfolioNode childNode = new ManageablePortfolioNode("Child");
    childNode.addPosition(UniqueId.of("TestPos", "1234"));
    rootNode.addChildNode(childNode);
    ManageablePortfolio portfolio = new ManageablePortfolio("Test");
    portfolio.setRootNode(rootNode);
    portfolio.addAttribute("A1", "V1");
    portfolio.addAttribute("A2", "V2");
    PortfolioDocument doc = new PortfolioDocument();
    doc.setPortfolio(portfolio);
    PortfolioDocument test = _prtMaster.add(doc);
   

Examples of com.opengamma.master.position.ManageablePosition.addAttribute()

  }

  @Test
  public void test_addWithTradesAndAttributes_addThenGet() {
    ManageablePosition position = new ManageablePosition(BigDecimal.TEN, ExternalId.of("A", "B"));
    position.addAttribute("PA1", "A");
    position.addAttribute("PA2", "B");
   
    LocalDate tradeDate = _now.toLocalDate();
    OffsetTime tradeTime = _now.toOffsetTime().minusSeconds(500);
    ManageableTrade trade1 = new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "B"), tradeDate, tradeTime, ExternalId.of("CPS", "CPV"));

Examples of com.opengamma.master.position.ManageableTrade.addAttribute()

    position.addAttribute("PA2", "B");
   
    LocalDate tradeDate = _now.toLocalDate();
    OffsetTime tradeTime = _now.toOffsetTime().minusSeconds(500);
    ManageableTrade trade1 = new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "B"), tradeDate, tradeTime, ExternalId.of("CPS", "CPV"));
    trade1.addAttribute("TA11", "C");
    trade1.addAttribute("TA12", "D");
    trade1.addAttribute("TA13", "E");
    position.getTrades().add(trade1);
   
    ManageableTrade trade2 = new ManageableTrade(BigDecimal.ONE, ExternalId.of("C", "D"), tradeDate, tradeTime, ExternalId.of("CPS", "CPV"));

Examples of com.puppycrawl.tools.checkstyle.DefaultConfiguration.addAttribute()

    @Test
    public void testHtmlAllowed() throws Exception
    {
        final DefaultConfiguration checkConfig = createCheckConfig(JavadocPackageCheck.class);
        checkConfig.addAttribute("allowLegacy", "true");
        final String[] expected = {};
        verify(createChecker(checkConfig),
            getPath("javadoc/pkghtml/Ignored.java"),
            getPath("javadoc/pkghtml/package-info.java"), expected);
    }

Examples of com.rapidminer.example.table.ExampleTable.addAttribute()

                Ontology.REAL);
         
             if(!attributes.contains(pred)){
            attributes.addRegular(pred);
            ExampleTable a=exampleSet.getExampleTable();
            a.addAttribute(pred);
             }
             else pred=attributes.get("prediction");
         
            int useRatingUpdate=0;
           

Examples of com.skaringa.javaxml.handler.AttrImpl.addAttribute()

    output.startDocument();
    output.startElement("xsd:schema");

    AttrImpl attr = new AttrImpl();
    attr.addAttribute("name", ser.getXMLTypeName());
    attr.addAttribute("type", ser.getXMLTypeName());
    attr.addAttribute("nillable", "true");
    output.startElement("xsd:element", attr);
    output.endElement("xsd:element");

Examples of com.sun.corba.se.spi.monitoring.MonitoredObject.addAttribute()

            {
                public Object getValue() {
                    return new Long(CorbaOutboundConnectionCacheImpl.this.numberOfConnections());
                }
            };
        thisMO.addAttribute(attribute);

        // ATTRIBUTE
        attribute = new
            LongMonitoredAttributeBase(
                MonitoringConstants.CONNECTION_NUMBER_OF_IDLE_CONNECTIONS,
TOP
Copyright © 2018 www.massapi.com. 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.