Class YinDomSchemaSource
java.lang.Object
org.opendaylight.yangtools.yang.model.repo.api.YinDomSchemaSource
- All Implemented Interfaces:
Identifiable<SourceIdentifier>
,Immutable
,SchemaSourceRepresentation
,YinSchemaSourceRepresentation
,YinXmlSchemaSource
Utility
YinXmlSchemaSource
exposing a W3C DOMSource
representation of YIN model.-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract MoreObjects.ToStringHelper
addToStringAttributes
(MoreObjects.ToStringHelper toStringHelper) Add subclass-specific attributes to the outputtoString()
output.static @NonNull YinDomSchemaSource
create
(@NonNull SourceIdentifier identifier, @NonNull DOMSource source, @Nullable String symbolicName) Create a newYinDomSchemaSource
using an identifier and a source.abstract DOMSource
Return an XMLSource
of the YIN document.final Class<YinDomSchemaSource>
getType()
Return the concrete representation type.static @NonNull YinDomSchemaSource
lazyTransform
(YinXmlSchemaSource xmlSchemaSource) Create aYinDomSchemaSource
from aYinXmlSchemaSource
.final String
toString()
static @NonNull YinDomSchemaSource
transform
(YinXmlSchemaSource xmlSchemaSource) Create aYinDomSchemaSource
from aYinXmlSchemaSource
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation
getIdentifier, getSymbolicName
-
Method Details
-
create
public static @NonNull YinDomSchemaSource create(@NonNull SourceIdentifier identifier, @NonNull DOMSource source, @Nullable String symbolicName) Create a newYinDomSchemaSource
using an identifier and a source.- Parameters:
identifier
- Schema source identifiersource
- W3C DOM sourcesymbolicName
- Source symbolic name- Returns:
- A new
YinDomSchemaSource
instance.
-
lazyTransform
Create aYinDomSchemaSource
from aYinXmlSchemaSource
. If the argument is already a YinDomSchemaSource, this method returns the same instance. The source will be translated on first access, at which point anIllegalStateException
may be raised.- Parameters:
xmlSchemaSource
- Backing schema source- Returns:
- A
YinDomSchemaSource
instance
-
transform
public static @NonNull YinDomSchemaSource transform(YinXmlSchemaSource xmlSchemaSource) throws TransformerException Create aYinDomSchemaSource
from aYinXmlSchemaSource
. If the argument is already a YinDomSchemaSource, this method returns the same instance. The source will be translated immediately.- Parameters:
xmlSchemaSource
- Backing schema source- Returns:
- A
YinDomSchemaSource
instance - Throws:
TransformerException
- when the provided source fails to transform
-
getSource
Description copied from interface:YinXmlSchemaSource
Return an XMLSource
of the YIN document.- Specified by:
getSource
in interfaceYinXmlSchemaSource
- Returns:
- An XML
Source
instance.
-
getType
Description copied from interface:SchemaSourceRepresentation
Return the concrete representation type.- Specified by:
getType
in interfaceSchemaSourceRepresentation
- Specified by:
getType
in interfaceYinSchemaSourceRepresentation
- Specified by:
getType
in interfaceYinXmlSchemaSource
- Returns:
- The type of representation.
-
toString
-
addToStringAttributes
protected abstract MoreObjects.ToStringHelper addToStringAttributes(MoreObjects.ToStringHelper toStringHelper) Add subclass-specific attributes to the outputtoString()
output. Since subclasses are prevented from overridingtoString()
for consistency reasons, they can add their specific attributes to the resulting string by attaching attributes to the suppliedMoreObjects.ToStringHelper
.- Parameters:
toStringHelper
- ToStringHelper onto the attributes can be added- Returns:
- ToStringHelper supplied as input argument.
-