Class CMRelaxNGAttributeDeclaration
- java.lang.Object
-
- com.thaiopensource.relaxng.pattern.CMRelaxNGAttributeDeclaration
-
- All Implemented Interfaces:
CMAttributeDeclaration
public class CMRelaxNGAttributeDeclaration extends Object implements CMAttributeDeclaration
RelaxNG content attribute implementation.NOTE : this class is hosted in 'com.thaiopensource.relaxng.pattern' because
Patternimplementation likeElementPatternare not public. Once https://github.com/relaxng/jing-trang/issues/271 will be fixed we could move this class in 'org.eclipse.lemminx.extensions.relaxng.contentmodel' package.- Author:
- Angelo ZERR
-
-
Constructor Summary
Constructors Constructor Description CMRelaxNGAttributeDeclaration(CMRelaxNGElementDeclaration element, com.thaiopensource.relaxng.pattern.AttributePattern pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAttributeNameDocumentation(ISharedSettingsRequest request)Returns formatted documentation of the declared attribute according to settings defined inrequestStringgetAttributeValueDocumentation(String value, ISharedSettingsRequest request)Returns formatted documentation aboutvalue, according to settings defined inrequestStringgetDefaultValue()Returns the default value of the declared attribute and null otherwise.Collection<String>getEnumerationValues()Returns enumeration values of the declared attribute and empty collection otherwise.StringgetLocalName()Returns the declared attribute local name.StringgetNamespace()Returns the target namespace and null otherwise.CMElementDeclarationgetOwnerElementDeclaration()Returns the owner element declaration.com.thaiopensource.relaxng.pattern.AttributePatterngetPattern()StringgetPrefix()booleanisRequired()Returns true if the attribute is required and false otherwise.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.lemminx.extensions.contentmodel.model.CMAttributeDeclaration
getName, getName
-
-
-
-
Constructor Detail
-
CMRelaxNGAttributeDeclaration
public CMRelaxNGAttributeDeclaration(CMRelaxNGElementDeclaration element, com.thaiopensource.relaxng.pattern.AttributePattern pattern)
-
-
Method Detail
-
getPrefix
public String getPrefix()
- Specified by:
getPrefixin interfaceCMAttributeDeclaration
-
getLocalName
public String getLocalName()
Description copied from interface:CMAttributeDeclarationReturns the declared attribute local name.- Specified by:
getLocalNamein interfaceCMAttributeDeclaration- Returns:
- the declared attribute local name.
-
getNamespace
public String getNamespace()
Description copied from interface:CMAttributeDeclarationReturns the target namespace and null otherwise.- Specified by:
getNamespacein interfaceCMAttributeDeclaration- Returns:
- the target namespace and null otherwise.
-
getOwnerElementDeclaration
public CMElementDeclaration getOwnerElementDeclaration()
Description copied from interface:CMAttributeDeclarationReturns the owner element declaration.- Specified by:
getOwnerElementDeclarationin interfaceCMAttributeDeclaration- Returns:
- the owner element declaration.
-
getDefaultValue
public String getDefaultValue()
Description copied from interface:CMAttributeDeclarationReturns the default value of the declared attribute and null otherwise.- Specified by:
getDefaultValuein interfaceCMAttributeDeclaration- Returns:
- the default value of the declared attribute and null otherwise.
-
getEnumerationValues
public Collection<String> getEnumerationValues()
Description copied from interface:CMAttributeDeclarationReturns enumeration values of the declared attribute and empty collection otherwise.- Specified by:
getEnumerationValuesin interfaceCMAttributeDeclaration- Returns:
- enumeration values of the declared attribute and empty collection otherwise.
-
getAttributeNameDocumentation
public String getAttributeNameDocumentation(ISharedSettingsRequest request)
Description copied from interface:CMAttributeDeclarationReturns formatted documentation of the declared attribute according to settings defined inrequest- Specified by:
getAttributeNameDocumentationin interfaceCMAttributeDeclaration- Parameters:
request- the request that contains settings- Returns:
- formatted documentation of the declared attribute according to
settings defined in
request
-
getAttributeValueDocumentation
public String getAttributeValueDocumentation(String value, ISharedSettingsRequest request)
Description copied from interface:CMAttributeDeclarationReturns formatted documentation aboutvalue, according to settings defined inrequest- Specified by:
getAttributeValueDocumentationin interfaceCMAttributeDeclaration- Parameters:
value- the attribute value to find documentation forrequest- the request containing settings- Returns:
- formatted documentation about
value, according to settings defined inrequest
-
isRequired
public boolean isRequired()
Description copied from interface:CMAttributeDeclarationReturns true if the attribute is required and false otherwise.- Specified by:
isRequiredin interfaceCMAttributeDeclaration- Returns:
- true if the attribute is required and false otherwise.
-
getPattern
public com.thaiopensource.relaxng.pattern.AttributePattern getPattern()
-
-