java.lang.Object
org.opendaylight.yangtools.yang.model.spi.source.YinDomSource
All Implemented Interfaces:
Immutable, SourceRepresentation, YinSourceRepresentation, YinXmlSource

public abstract sealed class YinDomSource extends Object implements YinXmlSource
Utility YinXmlSource exposing a W3C DOMSource representation of YIN model.
  • Constructor Details

    • YinDomSource

      public YinDomSource()
  • Method Details

    • create

      public static @NonNull YinDomSource create(@NonNull SourceIdentifier identifier, @NonNull DOMSource source, @Nullable String symbolicName)
      Create a new YinDomSource using an identifier and a source.
      Parameters:
      identifier - Schema source identifier
      source - W3C DOM source
      symbolicName - Source symbolic name
      Returns:
      A new YinDomSource instance.
    • lazyTransform

      public static @NonNull YinDomSource lazyTransform(YinXmlSource xmlSchemaSource)
      Create a YinDomSource from a YinXmlSource. If the argument is already a YinDomSchemaSource, this method returns the same instance. The source will be translated on first access, at which point an IllegalStateException may be raised.
      Parameters:
      xmlSchemaSource - Backing schema source
      Returns:
      A YinDomSource instance
    • transform

      public static @NonNull YinDomSource transform(YinXmlSource xmlSchemaSource) throws TransformerException
      Create a YinDomSource from a YinXmlSource. 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 YinDomSource instance
      Throws:
      TransformerException - when the provided source fails to transform
    • getType

      public final Class<YinDomSource> getType()
      Specified by:
      getType in interface SourceRepresentation
      Specified by:
      getType in interface YinSourceRepresentation
      Specified by:
      getType in interface YinXmlSource
    • getSource

      public abstract DOMSource getSource()
      Description copied from interface: YinXmlSource
      Return an XML Source of the YIN document.
      Specified by:
      getSource in interface YinXmlSource
      Returns:
      An XML Source instance.
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • addToStringAttributes

      protected abstract com.google.common.base.MoreObjects.ToStringHelper addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper)
      Add subclass-specific attributes to the output toString() output. Since subclasses are prevented from overriding toString() for consistency reasons, they can add their specific attributes to the resulting string by attaching attributes to the supplied MoreObjects.ToStringHelper.
      Parameters:
      toStringHelper - ToStringHelper onto the attributes can be added
      Returns:
      ToStringHelper supplied as input argument.