Class ReferencedGrammarInfo
java.lang.Object
org.eclipse.lemminx.extensions.contentmodel.model.ReferencedGrammarInfo
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 Summary
ConstructorsConstructorDescriptionReferencedGrammarInfo(ResolvedURIInfo resolvedURIInfo, GrammarCacheInfo grammarCacheInfo, ContentModelProvider.Identifier identifier) -
Method Summary
Modifier and TypeMethodDescriptionReturns the binding kind and null otherwise.static StringReturns the binding kind and resolved by label.Returns the grammar cache information and null otherwise.Returns the identifier (xml-model, xsi:schemaLocation, xsi:noNamespaceSchemaLocation, DOCTYPE) and null otherwise.Returns the system or public identifier URI and null otherwise.Returns the resolver which is used to resolve the identifier URI and null otherwise.Returns the resolved URI information (the result of the resolve and the resolution strategy (ex : catalog, file association, etc)).booleanReturns true if the grammar is in the .lemminx cache and false otherwise.
-
Constructor Details
-
ReferencedGrammarInfo
public ReferencedGrammarInfo(ResolvedURIInfo resolvedURIInfo, GrammarCacheInfo grammarCacheInfo, ContentModelProvider.Identifier identifier)
-
-
Method Details
-
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
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
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
Returns the system or public identifier URI and null otherwise.- Returns:
- the system or public identifier URI and null otherwise.
-
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
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
Returns the binding kind and resolved by label.- Parameters:
info- the referenced grammar information.- Returns:
- the binding kind and resolved by label.
-