Examples of StringSource


Examples of com.github.sommeri.less4j.LessSource.StringSource

    deleteFile(inputLessFile);
  }

  private static void guessedCssLocationExample2() throws Less4jException {
    URI uri = (new File("src/sampleInput.less")).toURI();
    StringSource lessSource = new StringSource(".class { margin: 1 1 1 1; }", "sampleInput.less", uri);
   
    LessCompiler compiler = new DefaultLessCompiler();
    CompilationResult compilationResult = compiler.compile(lessSource);

    System.out.println(compilationResult.getCss());
View Full Code Here

Examples of com.pogofish.jadt.source.StringSource

    @Test
    public void testExceptionHandling() {
        final Throwable thrown1 = new RuntimeException("oh yeah");
        try {
            final Parser parser = new StandardParser(new ThrowingParserImplFactory(thrown1));
            final ParseResult result = parser.parse(new StringSource("whatever", "whatever"));
            fail("did not get exception, got " + result);
        } catch (RuntimeException caught) {
            assertSame("got wrong exception", thrown1, caught);
        }
       
        final Throwable thrown2 = new Error("oh yeah");
        try {
            final Parser parser = new StandardParser(new ThrowingParserImplFactory(thrown2));
            final ParseResult result = parser.parse(new StringSource("whatever", "whatever"));
            fail("did not get exception, got " + result);
        } catch (Error caught) {
            assertSame("got wrong exception", thrown2, caught);
        }
       
        final Throwable thrown3 = new Exception("oh yeah");
        try {
            final Parser parser = new StandardParser(new ThrowingParserImplFactory(thrown3));
            final ParseResult result = parser.parse(new StringSource("whatever", "whatever"));
            fail("did not get exception, got " + result);
        } catch (RuntimeException caught) {
            assertSame("got wrong exception", thrown3, caught.getCause());
        }
    }
View Full Code Here

Examples of net.sf.laja.parser.engine2.source.StringSource

    return factory2;
  }

  // parse string
  public ParsingResult parseString(String string) throws ParserException {
    return parse(new StringSource(string));
  }
View Full Code Here

Examples of oracle.olapi.data.source.StringSource

    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("MYTIME");
       
//    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("MEDIA");
    MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();
    StringSource timeHier =  (StringSource) mdmTimeHier.getSource();
       
    Source levelElement = timeHier.selectValue("TIMEHIER::MONTH::MONTH_2011-M01");
       
    // Get the Source for the short label attribute of the dimension.
    Source prodShortLabel = mdmTimeDim.getShortValueDescriptionAttribute()
                                      .getSource();
       
    // Get the parent relation from the hierarchy.
    MdmAttribute mdmTimeHierParentAttr = mdmTimeHier.getParentAttribute();
   
    Source prodHierParentAttr = mdmTimeHierParentAttr.getSource();
       
    // Reverse the parent relation to get a children relation.
    Source timeHierChildren = timeHier.join(prodHierParentAttr,
        timeHier.value());
       
    // Select the children of the specified level element.
    Source levelElementChildren = timeHierChildren.join(timeHier, levelElement);
       
    //Join the children to the short description attribute.
View Full Code Here

Examples of org.apache.camel.StringSource

    /**
     * Converts the given String to a Source
     */
    @Converter
    public StringSource toStringSource(String data) {
        return new StringSource(data);
    }
View Full Code Here

Examples of org.apache.camel.StringSource

    /**
     * Converts the given String to a Source
     */
    @Converter
    public Source toSource(String data) {
        return new StringSource(data);
    }
View Full Code Here

Examples of org.apache.camel.StringSource

            if (inputSource.getByteStream() != null) {
                return new StreamSource(inputSource.getByteStream());
            }
        }
        String result = toString(source, exchange);
        return new StringSource(result);
    }
View Full Code Here

Examples of org.apache.camel.StringSource

    }

    @Converter
    public StreamSource toStreamSourceFromDOM(DOMSource source, Exchange exchange) throws TransformerException {
        String result = toString(source, exchange);
        return new StringSource(result);
    }
View Full Code Here

Examples of org.apache.camel.StringSource

        return new StringSource(result);
    }
    @Converter
    public StreamSource toStreamSourceFromStAX(StAXSource source, Exchange exchange) throws TransformerException {
        String result = toString(source, exchange);
        return new StringSource(result);
    }
View Full Code Here

Examples of org.apache.camel.StringSource

    /**
     * Converts the given String to a Source
     */
    @Converter
    public StringSource toStringSource(String data) {
        return new StringSource(data);
    }
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.