Class CMXSDAttributeDeclaration
java.lang.Object
org.eclipse.lemminx.extensions.xsd.contentmodel.CMXSDAttributeDeclaration
- All Implemented Interfaces:
CMAttributeDeclaration
XSD attribute declaration implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionCMXSDAttributeDeclaration(CMXSDElementDeclaration cmElement, org.apache.xerces.xs.XSAttributeUse attributeUse) -
Method Summary
Modifier and TypeMethodDescriptionReturns formatted documentation of the declared attribute according to settings defined inrequestgetAttributeValueDocumentation(String value, ISharedSettingsRequest request) Returns formatted documentation aboutvalue, according to settings defined inrequestReturns the explicit default value of the declared attribute (from schemadefaultorfixedconstraints) and null otherwise.Returns enumeration values of the declared attribute and empty collection otherwise.Returns the declared attribute local name.Returns the target namespace and null otherwise.Returns the owner element declaration.Returns a type-aware default value suitable for document generation.Returns the type name of the declared attribute (e.g., "xs:integer", "xs:boolean") and null if not available.booleanReturns true if the attribute is required and false otherwise.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.lemminx.extensions.contentmodel.model.CMAttributeDeclaration
getEnumerationValues, getName, getName
-
Constructor Details
-
CMXSDAttributeDeclaration
public CMXSDAttributeDeclaration(CMXSDElementDeclaration cmElement, org.apache.xerces.xs.XSAttributeUse attributeUse)
-
-
Method Details
-
getPrefix
- Specified by:
getPrefixin interfaceCMAttributeDeclaration
-
getLocalName
Description copied from interface:CMAttributeDeclarationReturns the declared attribute local name.- Specified by:
getLocalNamein interfaceCMAttributeDeclaration- Returns:
- the declared attribute local name.
-
getNamespace
Description copied from interface:CMAttributeDeclarationReturns the target namespace and null otherwise.- Specified by:
getNamespacein interfaceCMAttributeDeclaration- Returns:
- the target namespace and null otherwise.
-
getOwnerElementDeclaration
Description copied from interface:CMAttributeDeclarationReturns the owner element declaration.- Specified by:
getOwnerElementDeclarationin interfaceCMAttributeDeclaration- Returns:
- the owner element declaration.
-
getDefaultValue
Description copied from interface:CMAttributeDeclarationReturns the explicit default value of the declared attribute (from schemadefaultorfixedconstraints) and null otherwise. Does NOT include type-inferred defaults.- Specified by:
getDefaultValuein interfaceCMAttributeDeclaration- Returns:
- the explicit default value of the declared attribute and null otherwise.
-
getTypeAwareDefaultValue
Description copied from interface:CMAttributeDeclarationReturns a type-aware default value suitable for document generation. For XSD attributes, this returns type-inferred defaults (e.g., "0" for xs:decimal) when no explicit default exists. For other grammars, defaults toCMAttributeDeclaration.getDefaultValue().- Specified by:
getTypeAwareDefaultValuein interfaceCMAttributeDeclaration- Returns:
- the type-aware default value, or null.
-
getTypeName
Description copied from interface:CMAttributeDeclarationReturns the type name of the declared attribute (e.g., "xs:integer", "xs:boolean") and null if not available.- Specified by:
getTypeNamein interfaceCMAttributeDeclaration- Returns:
- the type name and null otherwise.
-
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.
-
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.
-