Class XMLFileAssociation

java.lang.Object
org.eclipse.lemminx.settings.PathPatternMatcher
org.eclipse.lemminx.extensions.contentmodel.settings.XMLFileAssociation

public class XMLFileAssociation extends PathPatternMatcher
XML file association between a XML file pattern (glob) and an XML Schema file (systemId).
  • Constructor Details

    • XMLFileAssociation

      public XMLFileAssociation()
  • Method Details

    • getSystemId

      public String getSystemId()
    • setSystemId

      public void setSystemId(String systemId)
    • setPattern

      public PathPatternMatcher setPattern(String pattern)
      Overrides:
      setPattern in class PathPatternMatcher
    • setWorkspaceFolderUris

      public void setWorkspaceFolderUris(List<String> workspaceFolderUris)
      Sets the workspace folder URIs used for resolving variables like ${workspaceFolder}.
      Parameters:
      workspaceFolderUris - the workspace folder URIs.
    • hasPatternVariables

      public boolean hasPatternVariables()
      Returns true if the pattern contains variable references.
      Returns:
      true if the pattern contains ${...} variable references.
    • hasSystemIdVariables

      public boolean hasSystemIdVariables()
      Returns true if the systemId contains variable references.
      Returns:
      true if the systemId contains ${...} variable references.
    • matches

      public boolean matches(URI uri)
      Overrides:
      matches in class PathPatternMatcher
    • getResolvedSystemId

      public String getResolvedSystemId(URI documentUri)
      Returns the systemId with variables resolved for the given document URI.
      Parameters:
      documentUri - the document URI.
      Returns:
      the resolved systemId.
    • getExternalSchemaLocation

      public Map<String,String> getExternalSchemaLocation()
    • getExternalSchemaLocation

      public Map<String,String> getExternalSchemaLocation(URI documentUri)
      Returns the external schema location map with variables resolved for the given document URI.
      Parameters:
      documentUri - the document URI, or null if no variable resolution is needed.
      Returns:
      the schema location map.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class PathPatternMatcher