Examples of Source


Examples of lombok.ast.grammar.Source

   
    if (verbose && !saveIntermediate) {
      System.out.printf("Processing: %s to %s\n", in.getCanonicalPath(), out == null ? "sysout" : out.getCanonicalPath());
    }
   
    Source source = new Source(Files.toString(in, charset), in.getCanonicalPath());
    Object transfer = null;
    String chain = "/";
   
    try {
      for (Operation<Object, Object> programElem : program) {
View Full Code Here

Examples of mf.javax.xml.transform.Source

       
        XMLInputSource[] xmlInputSources = new XMLInputSource[schemas.length];
        InputStream inputStream;
        Reader reader;
        for (int i = 0; i < schemas.length; ++i) {
            Source source = schemas[i];
            if (source instanceof StreamSource) {
                StreamSource streamSource = (StreamSource) source;
                String publicId = streamSource.getPublicId();
                String systemId = streamSource.getSystemId();
                inputStream = streamSource.getInputStream();
                reader = streamSource.getReader();
                XMLInputSource xmlInputSource = new XMLInputSource(publicId, systemId, null);
                xmlInputSource.setByteStream(inputStream);
                xmlInputSource.setCharacterStream(reader);              
                xmlInputSources[i] = xmlInputSource;
            }
            else if (source instanceof SAXSource) {
                SAXSource saxSource = (SAXSource) source;
                InputSource inputSource = saxSource.getInputSource();
                if (inputSource == null) {
                    throw new SAXException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
                            "SAXSourceNullInputSource", null));
                }
                xmlInputSources[i] = new SAXInputSource(saxSource.getXMLReader(), inputSource);
            }
            else if (source instanceof DOMSource) {
                DOMSource domSource = (DOMSource) source;
                //MF
                Node node = (Node) domSource.getNode();
                String systemID = domSource.getSystemId();         
                xmlInputSources[i] = new DOMInputSource(node, systemID);
            }
            else if (source instanceof StAXSource) {
                StAXSource staxSource = (StAXSource) source;
                XMLEventReader eventReader = staxSource.getXMLEventReader();
                if (eventReader != null) {
                    xmlInputSources[i] = new StAXInputSource(eventReader);
                }
                else {
                    xmlInputSources[i] = new StAXInputSource(staxSource.getXMLStreamReader());
                }
            }
            else if (source == null) {
                throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
                        "SchemaSourceArrayMemberNull", null));
            }
            else {
                throw new IllegalArgumentException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
                        "SchemaFactorySourceUnrecognized",
                        new Object [] {source.getClass().getName()}));
            }
        }
       
        try {
            fXMLSchemaLoader.loadGrammar(xmlInputSources);
View Full Code Here

Examples of net.htmlparser.jericho.Source

            fileForParsing = new File(pathToFile);
            length = (int) fileForParsing.length();

            if (length != 0) {
                Source source;
                char[] cbuf = new char[length];
                InputStreamReader isr = new InputStreamReader(
                        new FileInputStream(fileForParsing), fileEnc);
                final int read = isr.read(cbuf);

                fileContent = new String(cbuf, 0, read);
                isr.close();

                source = new Source(fileContent);
                source.setLogger(null);
                fileContent = source.getTextExtractor().toString();

                pathToFile = null;
                source = null;
                isr = null;
                fileForParsing = null;
View Full Code Here

Examples of net.java.trueupdate.core.io.Source

     * @return A source for reading the ZIP patch file for the described
     *         artifact and its update version.
     */
    public Source diff(final ArtifactDescriptor descriptor,
                       final String updateVersion) {
        return new Source() {
            @Override public InputStream input() throws IOException {
                return get(path("artifact/diff")
                        .queryParams(queryParameters(descriptor))
                        .queryParam("update-version", updateVersion)
                        .accept(APPLICATION_OCTET_STREAM_TYPE)
View Full Code Here

Examples of net.sf.kpex.prolog.Source

  }

  @Override
  public int exec(Prog p)
  {
    Source original = (Source) getArg(0);
    Const Xs = original.toList();
    return putArg(1, new net.sf.kpex.prolog.ListSource(Xs, p), p) > 0
        && putArg(2, new net.sf.kpex.prolog.ListSource(Xs, p), p) > 0 ? 1 : 0;
  }
View Full Code Here

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

    }

    int endBookmark = source.getBookmark();
   
    for (ElementList pipeTo : pipeToElements) {
      Source pipeToSource = source.newSource(bookmark, endBookmark);
      match = pipeTo.parse(level, pipeToSource, parentNot, caseSensitive, receive);
      if (!match) {
        source.setBestIndex(bestIndex);
        return false;
      }
      if (!pipeToSource.reachedEnd()) {
        int bestToIndex = pipeToSource.getBestIndex();
        if (bestToIndex >= 0 && bestToIndex > bestIndex) {
          source.setBestIndex(bestToIndex);
        }
        return false;
      }
View Full Code Here

Examples of net.sourceforge.cobertura.util.Source

    FileFinder finder;

    public void read(String sourceFileName, Callback callback) throws Exception {

        Closer c = new Closer();
        final Source source = finder.getSource(sourceFileName);
        if (source == null) {
            throw new SourceReaderException("Could not find source file for "
                    + sourceFileName);
        }
        c.register(new Closeable() {

            @Override
            public void close() throws IOException {
                source.close();
            }
        });

        BufferedReader br = null;
        try {
View Full Code Here

Examples of nexj.core.persistence.Source

      BitSet attrSet = new BitSet(query.getMetaclass().getInstanceAttributeCount());
      int nCount = sourceList.size();

      for (int nSource = 0; nSource < nCount; nSource++)
      {
         Source source = (Source)sourceList.get(nSource);

         if (source instanceof Field)
         {
            attrSet.set(((Field)source).getAttribute().getOrdinal());
         }
         else
         {
            Query assoc = source.getQuery();

            if (assoc.getParent() == query)
            {
               attrSet.set(assoc.getAttribute().getOrdinal());
            }
View Full Code Here

Examples of oracle.olapi.data.source.Source

//    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.
    Source levelElementChildrenWithShortDescr =
                                     prodShortLabel.join(levelElementChildren);
       
    // Prepare and commit the current Transaction.
    prepareAndCommit();
       
View Full Code Here

Examples of org.apache.abdera.model.Source

      if (altlink != null) {
        irt.setHref(altlink.getResolvedHref());
        if (altlink.getMimeType() != null)
          irt.setMimeType(altlink.getMimeType());
      }
      Source src = ref.getSource();
      if (src != null) {
        Link selflink = src.getSelfLink();
        if (selflink != null)
          irt.setSource(selflink.getResolvedHref());
      }
    } catch (Exception e) {}
    return irt;
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.