public class SampleDataResourceValueImpl extends ResourceValueImpl implements SampleDataResourceValue
ResourceValue used to contain the value of a Sample Data source. This class avoids
having to split potentially large files multiple times since we store it as a list of lines.mNamespaceResolver| Constructor and Description |
|---|
SampleDataResourceValueImpl(ResourceReference reference,
byte[] content) |
| Modifier and Type | Method and Description |
|---|---|
ResourceReference |
getReference()
If this
ResourceValue references another one, returns a ResourceReference to
it, otherwise null. |
java.lang.String |
getValue()
Returns the value of the resource, as defined in the XML.
|
com.google.common.collect.ImmutableList<java.lang.String> |
getValueAsLines() |
asReference, equals, getLibraryName, getName, getNamespace, getNamespaceResolver, getResourceType, hashCode, isFramework, isUserDefined, replaceWith, setNamespaceResolver, setValue, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitasReference, getLibraryName, getName, getNamespace, getNamespaceResolver, getRawXmlValue, getResourceType, getResourceUrl, isFramework, isUserDefined, setNamespaceResolver, setValuepublic SampleDataResourceValueImpl(@NonNull
ResourceReference reference,
@Nullable
byte[] content)
@Nullable public java.lang.String getValue()
ResourceValueStyleResourceValue.getValue in interface ResourceValuegetValue in class ResourceValueImpl@NonNull public com.google.common.collect.ImmutableList<java.lang.String> getValueAsLines()
getValueAsLines in interface SampleDataResourceValue@Nullable public ResourceReference getReference()
ResourceValueResourceValue references another one, returns a ResourceReference to
it, otherwise null.
This method should be called before inspecting the textual value (ResourceValue.getValue()), as
it handles namespaces correctly.
getReference in interface ResourceValue