Class ReferencedGrammarInfo

java.lang.Object
org.eclipse.lemminx.extensions.contentmodel.model.ReferencedGrammarInfo

public class ReferencedGrammarInfo extends Object
Class which holds a referenced grammar information.

In other words, it gives information about

  • which XSD, DTD file is bound to the DOM document.
  • which binding strategies is used (catalog, file association, xsi:schemaLocation, xsi:noNamespaceSchemaLocation, DOCTYPE).
  • the cache file path (for remote grammar with http://)
  • Constructor Details

  • Method Details

    • getResolvedURIInfo

      public ResolvedURIInfo getResolvedURIInfo()
      Returns the resolved URI information (the result of the resolve and the resolution strategy (ex : catalog, file association, etc)).
      Returns:
      the resolved URI information (the result of the resolve and the resolution strategy
    • getGrammarCacheInfo

      public GrammarCacheInfo getGrammarCacheInfo()
      Returns the grammar cache information and null otherwise. (grammar is not a remote grammar with http://)
      Returns:
      the grammar cache information and null otherwise.
    • getIdentifier

      public ContentModelProvider.Identifier getIdentifier()
      Returns the identifier (xml-model, xsi:schemaLocation, xsi:noNamespaceSchemaLocation, DOCTYPE) and null otherwise.
      Returns:
      the identifier (xml-model, xsi:schemaLocation, xsi:noNamespaceSchemaLocation, DOCTYPE) and null otherwise.
    • isInCache

      public boolean isInCache()
      Returns true if the grammar is in the .lemminx cache and false otherwise.
      Returns:
      true if the grammar is in the .lemminx cache and false otherwise.
    • getIdentifierURI

      public String getIdentifierURI()
      Returns the system or public identifier URI and null otherwise.
      Returns:
      the system or public identifier URI and null otherwise.
    • getBindingKind

      public String getBindingKind()
      Returns the binding kind and null otherwise. Binding kind can have values:
      • xsi:schemaLocation
      • xsi:noNamespaceSchemaLocation
      • doctype
      • xml-model
      Returns:
      the binding kind and null otherwise.
    • getResolvedBy

      public String getResolvedBy()
      Returns the resolver which is used to resolve the identifier URI and null otherwise. Resolved by can have values:
      • catalog
      • file association
      • embedded catalog.xsd
      • embedded xml.xsd
      • embedded xslt.xsd
      Returns:
      the resolver which is used to resolve the identifier URI and null otherwise.
    • getBindingKindAndResolvedBy

      public static String getBindingKindAndResolvedBy(ReferencedGrammarInfo info)
      Returns the binding kind and resolved by label.
      Parameters:
      info - the referenced grammar information.
      Returns:
      the binding kind and resolved by label.