Package org.openquark.gems.client.services

Examples of org.openquark.gems.client.services.GemFactory


    /**
     * @see org.openquark.samples.bam.model.InputBinding#getOutputGem(BasicCALServices, org.openquark.gems.client.GemGraph, org.openquark.samples.bam.BindingContext)
     */
    @Override
    public Gem getOutputGem (BasicCALServices calServices, GemGraph gemGraph, BindingContext bindingContext) {
        ValueGem constantGem = new GemFactory(calServices).makeValueGem(value);
       
        gemGraph.addGem(constantGem);
       
        return constantGem;
    }
View Full Code Here


        List<InputBinding> allBindings = parseAndSubstitute (template, argumentBindings);
       
        Gem resultGem = null;
       
        if (allBindings.isEmpty()) {
            resultGem = new GemFactory(calServices).makeValueGem("");
           
            gemGraph.addGem(resultGem);
        } else {
            // build the string up from right to left
            for (int bindingN = allBindings.size() - 1; bindingN >= 0; --bindingN) {
View Full Code Here

        ////
        /// We can use the runCode method on BasicCALServices to evaluate gems defined by gem graphs.
        //

        try {
            GemFactory gemFactory = new GemFactory(calServices);
            SourceModel.FunctionDefn.Algebraic gemSource = factorialGemGraph(gemFactory, calServices).getCALSource();
   
            EntryPointSpec entryPointSpec = calServices.addNewModuleWithFunction(RUN_MODULE, gemSource);
           
            try {
View Full Code Here

        ////
        /// We can use the runCode method on BasicCALServices and GemGenerator to evaluate gems defined by gem graphs.
        //

        try {
            GemFactory gemFactory = new GemFactory(calServices);

            SourceModel.FunctionDefn.Algebraic gemSource = positiveOutlierDetectorGemGraph(gemFactory, calServices).getCALSource();
            EntryPointSpec entryPointSpec = calServices.addNewModuleWithFunction(RUN_MODULE, gemSource);

            List<?> result;
View Full Code Here

     * @see #factorialGemGraph
     * @see #positiveOutlierDetectorGemGraph
     * @see #demoMapGemGraph
     */
    public static void dumpAllGemGraphSourceDefinitions(BasicCALServices calServices) {
        GemFactory gemFactory = new GemFactory(calServices);

        try {
            System.out.println(getGemGraphSourceDefinition(factorialGemGraph(gemFactory, calServices)));
            System.out.println(getGemGraphSourceDefinition(positiveOutlierDetectorGemGraph(gemFactory, calServices)));
            System.out.println(getGemGraphSourceDefinition(demoMapGemGraph(gemFactory, calServices)));
View Full Code Here

     * Performs the setup for the test suite.
     */
    private static void oneTimeSetUp() {
        calServices = BasicCALServices.make(GemCutter.GEMCUTTER_PROP_WORKSPACE_FILE, "cal.platform.test.cws", null);                  
        calServices.compileWorkspace(null, new MessageLogger());       
        gemFactory = new GemFactory(calServices);
    }
View Full Code Here

TOP

Related Classes of org.openquark.gems.client.services.GemFactory

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.