Package org.gvt.model.biopaxl3

Examples of org.gvt.model.biopaxl3.Product


        // We don't have a reference to the selected Product.
        // So first we have to lookup the object,
        // we do this by a query by example (QBE):
        // 1. build an example object with matching primary key values:
        Product example = new Product();
        example.setId(id);
        // 2. build a QueryByIdentity from this sample instance:
        Query query = new QueryByIdentity(example);
        try
        {
            // start broker transaction
            broker.beginTransaction();
            // lookup the product specified by the QBE
            Product toBeDeleted = (Product) broker.getObjectByQuery(query);
            // now ask broker to delete the object
            broker.delete(toBeDeleted);
            // commit transaction
            broker.commitTransaction();
        }
View Full Code Here


    /** perform this use case*/
    public void apply()
    {
        // this will be our new object
        Product newProduct = new Product();
       
        // thma: attention, no sequence numbers yet for ojb/prevalyer       
        newProduct.setId((int)System.currentTimeMillis());
       
        // now read in all relevant information and fill the new object:
        System.out.println("please enter a new product");
        String in = readLineWithMessage("enter name:");
        newProduct.setName(in);
        in = readLineWithMessage("enter price:");
        newProduct.setPrice(Double.parseDouble(in));
        in = readLineWithMessage("enter available stock:");
        newProduct.setStock(Integer.parseInt(in));

        // now perform persistence operations
        try
        {
            // 1. open transaction
View Full Code Here

      {
        NodeModel model = (NodeModel) o;

        if (model instanceof Actor)
        {
          Actor actor = (Actor) model;

          System.out.println(actor.getEntity().l3pe.getRDFId());
        }
        else if (o instanceof ChbComplex)
        {
          ChbComplex cmp = (ChbComplex) o;
          System.out.println(cmp.getComplex().getRDFId());
View Full Code Here

          BioPAXL2Reader reader = new BioPAXL2Reader(model);
          reader.createGraph((BioPAXL2Graph) root);
        }
        else if (level == BioPAXLevel.L3)
        {
          root = new BioPAXL3Graph(model);
          BioPAXL3Reader reader = new BioPAXL3Reader(model);
          reader.createGraph((BioPAXL3Graph) root);
        }
      }
    }
View Full Code Here

          System.out.println(actor.getEntity().l3pe.getRDFId());
        }
        else if (o instanceof ChbComplex)
        {
          ChbComplex cmp = (ChbComplex) o;
          System.out.println(cmp.getComplex().getRDFId());
        }
      }
    }

  }
View Full Code Here

      for (GraphObject go : content)
      {
        if (go instanceof ChbConversion)
        {
          ChbConversion conv = (ChbConversion) go;
          org.biopax.paxtools.model.level3.Conversion cnv = conv.getConversion();
          convSet.add(cnv);
        }
      }

      Set<Process> components = l3p.getPathwayComponent();
View Full Code Here

TOP

Related Classes of org.gvt.model.biopaxl3.Product

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.