Class YinTextSource
java.lang.Object
com.google.common.io.ByteSource
org.opendaylight.yangtools.yang.model.spi.source.YinTextSource
- All Implemented Interfaces:
Immutable
,SourceRepresentation
,YinSourceRepresentation
YIN text schema source representation. Exposes an RFC6020 or RFC7950 XML representation as an
InputStream
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MoreObjects.ToStringHelper
addToStringAttributes
(@NonNull MoreObjects.ToStringHelper toStringHelper) Add subclass-specific attributes to the outputtoString()
output.static @NonNull YinTextSource
delegateForByteSource
(SourceIdentifier identifier, ByteSource delegate) Create a new YinTextSchemaSource with a specific source identifier and backed by ByteSource, which provides the actual InputStreams.static @NonNull YinTextSource
static @NonNull YinTextSource
forResource
(Class<?> clazz, String resourceName) final Class<YinTextSource>
getType()
Return the concrete representation type.static @NonNull SourceIdentifier
identifierFromFilename
(String name) final SourceIdentifier
sourceId()
TheSourceIdentifier
of this source.final String
toString()
Methods inherited from class com.google.common.io.ByteSource
asCharSource, concat, concat, concat, contentEquals, copyTo, copyTo, empty, hash, isEmpty, openBufferedStream, openStream, read, read, size, sizeIfKnown, slice, wrap
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.api.source.SourceRepresentation
symbolicName
-
Constructor Details
-
YinTextSource
-
-
Method Details
-
identifierFromFilename
-
sourceId
Description copied from interface:SourceRepresentation
TheSourceIdentifier
of this source.- Specified by:
sourceId
in interfaceSourceRepresentation
- Returns:
SourceIdentifier
of this source
-
getType
Description copied from interface:SourceRepresentation
Return the concrete representation type.- Specified by:
getType
in interfaceSourceRepresentation
- Specified by:
getType
in interfaceYinSourceRepresentation
- Returns:
- The type of representation.
-
toString
-
addToStringAttributes
protected MoreObjects.ToStringHelper addToStringAttributes(@NonNull 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.
-
delegateForByteSource
public static @NonNull YinTextSource delegateForByteSource(SourceIdentifier identifier, ByteSource delegate) Create a new YinTextSchemaSource with a specific source identifier and backed by ByteSource, which provides the actual InputStreams.- Parameters:
identifier
- SourceIdentifier of the resulting schema sourcedelegate
- Backing ByteSource instance- Returns:
- A new YinTextSchemaSource
-
forPath
-
forResource
-