Examples of FunctionName


Examples of com.liusoft.dlog4j.base.FunctionName

    this.musicsRecommend = musicsRecommend;
  }

  public FunctionName getFunctionName() {
    if(functionName==null)
      functionName = new FunctionName();
    return functionName;
  }
View Full Code Here

Examples of org.apache.cassandra.cql3.functions.FunctionName

    @Test
    public void testFunctionDropOnKeyspaceDrop() throws Throwable
    {
        execute("CREATE FUNCTION " + KS_FOO + ".sin ( input double ) RETURNS double LANGUAGE java AS 'return Double.valueOf(Math.sin(input.doubleValue()));'");

        Assert.assertEquals(1, Functions.find(new FunctionName(KS_FOO, "sin")).size());

        assertRows(execute("SELECT function_name, language FROM system.schema_functions WHERE keyspace_name=?", KS_FOO),
                   row("sin", "java"));

        execute("DROP KEYSPACE "+KS_FOO+";");

        assertRows(execute("SELECT function_name, language FROM system.schema_functions WHERE keyspace_name=?", KS_FOO));

        Assert.assertEquals(0, Functions.find(new FunctionName(KS_FOO, "sin")).size());
    }
View Full Code Here

Examples of org.apache.cassandra.cql3.functions.FunctionName

    {
        createTable("CREATE TABLE %s (key int PRIMARY KEY, d double)");

        execute("CREATE FUNCTION " + KS_FOO + ".sin ( input double ) RETURNS double LANGUAGE java AS 'return Double.valueOf(Math.sin(input.doubleValue()));'");

        Assert.assertEquals(1, Functions.find(new FunctionName(KS_FOO, "sin")).size());

        ResultMessage.Prepared prepared = QueryProcessor.prepare("SELECT key, "+KS_FOO+".sin(d) FROM "+KEYSPACE+'.'+currentTable(), ClientState.forInternalCalls(), false);
        Assert.assertNotNull(QueryProcessor.instance.getPrepared(prepared.statementId));

        execute("DROP FUNCTION " + KS_FOO + ".sin(double);");

        Assert.assertNull(QueryProcessor.instance.getPrepared(prepared.statementId));

        //

        execute("CREATE FUNCTION " + KS_FOO + ".sin ( input double ) RETURNS double LANGUAGE java AS 'return Double.valueOf(Math.sin(input.doubleValue()));'");

        Assert.assertEquals(1, Functions.find(new FunctionName(KS_FOO, "sin")).size());

        prepared = QueryProcessor.prepare("SELECT key, "+KS_FOO+".sin(d) FROM "+KEYSPACE+'.'+currentTable(), ClientState.forInternalCalls(), false);
        Assert.assertNotNull(QueryProcessor.instance.getPrepared(prepared.statementId));

        execute("DROP KEYSPACE " + KS_FOO + ";");
View Full Code Here

Examples of org.apache.tapestry5.clojure.FunctionName

public class AnnotationMapper implements MethodToFunctionSymbolMapper
{
    @Override
    public Symbol mapMethod(String namespace, Method method)
    {
        FunctionName annotation = method.getAnnotation(FunctionName.class);

        if (annotation == null)
        {
            return null;
        }

        String name = annotation.value();

        if (name.contains("/"))
        {
            return Symbol.create(name);
        }
View Full Code Here

Examples of org.apache.tapestry5.clojure.FunctionName

public class AnnotationMapper implements MethodToFunctionSymbolMapper
{
    public Symbol mapMethod(String namespace, Method method)
    {
        FunctionName annotation = method.getAnnotation(FunctionName.class);

        if (annotation == null)
        {
            return null;
        }

        String name = annotation.value();

        if (name.contains("/"))
        {
            return Symbol.create(name);
        }
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.FunctionName

    initialize(str);

    List<FunctionInvocation> invocations = getAllOfType(program,
        FunctionInvocation.class);
    Assert.assertTrue("Unexpected list size.", invocations.size() == 1);
    FunctionName functionName = invocations.get(0).getFunctionName();
    functionName.setName(ast.newIdentifier("boobo"));
    rewrite();
    checkResult("<?php boobo(); ?>");
  }
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

                    return proposal;
                }
            }

            public String getDescription() {
                FunctionName description = functionFinder.findFunctionDescription(proposal);
                if (description != null) {
                    StringBuilder builder = new StringBuilder();

                    builder.append(description.getName());
                    String seperator = null;
                    if (description.getArguments() != null && !description.getArguments().isEmpty()) {
                        for (Parameter<?> param : description.getArguments()) {
                            if (seperator == null) {
                                builder.append("(");
                                seperator = ",";
                            } else {
                                builder.append(seperator);
                            }
                            builder.append(param.getName());
                        }

                        builder.append(")\nWhere:\n");
                        for (Parameter<?> param : description.getArguments()) {
                            builder.append("  ");
                            describeParameter(builder, param);
                            builder.append("\n");
                        }
                    }
                    if (description.getReturn() != null) {
                        builder.append("Result:\n");
                        Parameter<?> param = description.getReturn();
                       
                        builder.append(" ");
                        describeParameter(builder, param);
                        builder.append("\n");
                    }
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

                semanticTypeIdentifier = semanticTypeIdentifier.concat(paletteName.toLowerCase());
               
                //create the classification function, if necessary
                if (classifierModified) {
                    //TODO: add other classifiers
                  FunctionName fn = null;
                    boolean createClassifier = true;
                    if (getCombo(COMBO_BREAKTYPE).getText().equalsIgnoreCase(Messages.StyleEditor_theme_uniques))
                      fn = UniqueIntervalFunction.NAME;
                    else if (getCombo(COMBO_BREAKTYPE).getText().equalsIgnoreCase(Messages.StyleEditor_theme_equalInterval))
                      fn = EqualIntervalFunction.NAME;
                    else if (getCombo(COMBO_BREAKTYPE).getText().equalsIgnoreCase(Messages.StyleEditor_theme_quantile))
                      fn = QuantileFunction.NAME;
                    else if (getCombo(COMBO_BREAKTYPE).getText().equalsIgnoreCase(Messages.StyleEditor_theme_standardDeviation))
                      fn = StandardDeviationFunction.NAME;
                    else if (getCombo(COMBO_BREAKTYPE).getText().equalsIgnoreCase(Messages.StyleEditor_theme_custom)){
                        classifier = customBreak;
                        createClassifier = false;
                    }else{
                        return;
                    }
                   
          if (createClassifier) {
            function = (ClassificationFunction) ff.function(fn.getFunctionName(), new Expression[fn.getArgumentCount()]);
           
            ProgressListener cancelProgress = ((StyleEditorDialog) getContainer()).getProgressListener();
            function.setProgressListener((org.geotools.util.ProgressListener) cancelProgress);
            numClasses = new Integer(getCombo(COMBO_CLASSES).getText()).intValue();
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

    }

    public void testParse() throws Exception {
        FilterMockData.functionName(document, document);

        FunctionName function = (FunctionName) parse(OGC.FunctionNameType);

        assertEquals("foo", function.getName());
        assertEquals(2, function.getArgumentCount());
    }
View Full Code Here

Examples of org.opengis.filter.capability.FunctionName

        assertEquals("foo", function.getName());
        assertEquals(2, function.getArgumentCount());
    }

    public void testEncode() throws Exception {
        FunctionName function = FilterMockData.functionName();
        Document dom = encode(function, new QName(OGC.NAMESPACE, "FunctionName"),
                OGC.FunctionNameType);

        assertEquals("foo", dom.getDocumentElement().getFirstChild().getNodeValue());
        assertEquals("2", dom.getDocumentElement().getAttribute("nArgs"));
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.