Class PatternParser


  • public class PatternParser
    extends BasePatternParser
    Since:
    2.0
    No Extend:
    This class is not intended to be subclassed by clients.
    • Field Detail

      • UNUSED_RELATIVE_URI_PROVIDER

        public static final java.util.function.BiFunction<org.eclipse.emf.ecore.resource.ResourceSet,​java.lang.String,​org.eclipse.emf.common.util.URI> UNUSED_RELATIVE_URI_PROVIDER
        This function encodes the default URI scheme generation used in VIATRA 2.0.0; it is not recommended to use as it can cause surprising behavior with regards to the Xtext index; only provided for backward compatibility. For most users the UNUSED_ABSOLUTE_FILE_URI_PROVIDER provides an appropriate default implementations; other users can provide custom implementations with PatternParserBuilder#unusedURIComputer(BiFunction).
        Since:
        2.1
      • UNUSED_ABSOLUTE_FILE_URI_PROVIDER

        public static final java.util.function.BiFunction<org.eclipse.emf.ecore.resource.ResourceSet,​java.lang.String,​org.eclipse.emf.common.util.URI> UNUSED_ABSOLUTE_FILE_URI_PROVIDER
        This function encodes the a file URI scheme that is relative to folder described by the user.dir system property.
        Since:
        2.1
    • Constructor Detail

      • PatternParser

        protected PatternParser​(java.util.Set<IQuerySpecification<?>> librarySpecifications,
                                java.util.Set<org.eclipse.emf.common.util.URI> libraryURIs,
                                java.util.function.BiFunction<org.eclipse.emf.ecore.resource.ResourceSet,​java.lang.String,​org.eclipse.emf.common.util.URI> unusedURIComputer,
                                java.util.Optional<java.lang.ClassLoader> classloader)
        Since:
        2.4
    • Method Detail

      • parse

        public PatternParsingResults parse​(java.lang.String text)
        Parses a string as the contents of a VQL file and puts the results in a Resource with a previously unused URI
      • parse

        public PatternParsingResults parse​(java.lang.String text,
                                           org.eclipse.emf.common.util.URI uri)
        Parses a string as the contents of a VQL file and puts the results in a Resource with the specified URI
        Since:
        2.1
      • parse

        protected PatternParsingResults parse​(java.io.InputStream in,
                                              org.eclipse.emf.common.util.URI uriToUse,
                                              java.util.Map<?,​?> options,
                                              org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
      • parse

        protected PatternParsingResults parse​(java.lang.String text,
                                              org.eclipse.emf.ecore.resource.ResourceSet resourceSetToUse)
      • parse

        protected PatternParsingResults parse​(java.lang.String text,
                                              org.eclipse.emf.common.util.URI uriToUse,
                                              org.eclipse.emf.ecore.resource.ResourceSet resourceSetToUse)