Examples of OCVariant


Examples of com.ipc.oce.OCVariant

   * @param propName
   * @return OCVariant
   * @throws JIException
   */
  public OCVariant getValue(String propName) throws JIException{
    return new OCVariant(get(propName));
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

   * @param xpath Строка-выражение XPath для получения значения свойства
   * @return
   * @throws JIException
   */
  public OCVariant getValueForXPath(String xpath) throws JIException{
    return new OCVariant(callMethodA("Get", new Object[]{new JIVariant(xpath)})[0]);
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

      String oName = amoTmp.getName();
      //String tName = transliterate(oName);
      Element elem = doc.createElementNS(ns, "Attribute");
      elem.setAttribute("name", oName);
     
      OCVariant var = documentObject.getAttributeValue(oName);
      Object varValue = var.value();
      int typeCode = var.getTypeCode();
      boolean isRef = (typeCode > 99);
     
      Object attrVal = documentObject.getAttributeValue(oName).value();
     
      //handle different type of types
View Full Code Here

Examples of com.ipc.oce.OCVariant

   * @param dataObject Объект XDTO.
   * @return Произвольный
   * @throws JIException
   */
  public OCVariant readXDTO(OCXDTODataObject dataObject) throws JIException{
    return new OCVariant(callMethodA("ReadXDTO", new Object[]{ocObject2Dispatch(dataObject)})[0]);
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

   */
  public OCXMLSchemaSet exportXMLSchema(String[] uriNamespaces) throws JIException{
    OCArray array = OCApp.getInstance(getAssociatedSessionID()).newArray();
    if (uriNamespaces != null) {
      for (String element : uriNamespaces) {
        array.add(new OCVariant(element));
      }
    }
    return exportXMLSchema(array);
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

   * Содержит примитивное значение платформы, в которое отображается данное значение XDTO
   * @return OCVariant
   * @throws JIException
   */
  public OCVariant getValue() throws JIException{
    return new OCVariant(get("Value"));
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

   
    //setup event's filtraton
    if (eventTypes != null && eventTypes.length > 0) {
      OCArray array = appInstance.newArray();
      for (String eventName : eventTypes) {
        array.add(new OCVariant(eventName));
      }
      structure.insert(FLD_EVENT, array);
    }
   
    // setup start date filtration
    if (startDate != null) {
      structure.insert(FLD_START_DATE, startDate);
    }
   
    // setup end date filtration
    if (endDate != null) {
      structure.insert(FLD_END_DATE, endDate);
    }

    // setup metadata filtration
    if (metadataObject != null && metadataObject.length > 0) {
      OCArray array = appInstance.newArray();
      for (_OCCommonMetadataObject cmo : metadataObject) {
        OCVariant variant = new OCVariant(cmo);
        array.add(variant);
      }
      structure.insert(FLD_METADATA, array);
    }
   
    // insert levels' condition
    if (eventLevels != null && eventLevels.length > 0) {
      OCArray array = appInstance.newArray();
      for (EEventLogLevel level : eventLevels) {
        OCVariant variant = new OCVariant(level);
        array.add(variant);
      }
      structure.insert(FLD_EVENT_LEVEL, array);
    }
   
View Full Code Here

Examples of com.ipc.oce.OCVariant

*/
public class NewValue extends BasicTest {

  @Test(expected = IllegalStateException.class)
  public void double2intWrong() throws JIException {
    OCVariant var = new OCVariant(new Double(10.90));
    Object di = var.value(Integer.class);
    assertTrue(di instanceof Double);
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

    assertTrue(di instanceof Double);
  }

  @Test
  public void double2bigDecimalCorrect() throws JIException {
    OCVariant var = new OCVariant(new Double(10.876));
    Object di = var.value(BigDecimal.class);
    assertTrue(di instanceof BigDecimal);
  }
View Full Code Here

Examples of com.ipc.oce.OCVariant

    assertTrue(di instanceof BigDecimal);
  }

  @Test(timeout = 5)
  public void double2intCorrect() throws JIException {
    OCVariant var = new OCVariant(new Double(10));

    Object di = var.value(Integer.class);
    assertTrue(di instanceof Integer);
  }
View Full Code Here
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.