ContentSource Class
- java.
lang. Object - com.
azure. ai. contentunderstanding. models. ContentSource
- com.
public abstract class ContentSource
Abstract base class for parsed grounding sources returned by Content Understanding.
The service encodes source positions as compact strings in the getSources() property. This class hierarchy parses those strings into strongly-typed objects:
- DocumentSource —
D(page,x1,y1,x2,y2,x3,y3,x4,y4) - AudioVisualSource —
AV(time[,x,y,w,h])
Use parse(String source) or parse(String source) to parse a semicolon-delimited string containing one or more segments.
Constructor Summary
| Modifier | Constructor | Description |
|---|---|---|
| protected | ContentSource(String rawValue) |
Initializes a new instance of ContentSource. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| boolean | equals(Object obj) |
| String |
getRawValue()
Gets the original wire-format source string. |
| int | hashCode() |
|
static
List<Content |
parseAll(String source)
Parses a semicolon-delimited string containing one or more source segments. |
| static String |
toRawString(List<? extends ContentSource> sources)
Reconstructs the wire-format source string by joining each element's getRawValue() with semicolons. |
| String |
toString()
Returns the wire-format string representation of this source. |
Methods inherited from java.lang.Object
Constructor Details
ContentSource
protected ContentSource(String rawValue)
Initializes a new instance of ContentSource.
Parameters:
Method Details
equals
public boolean equals(Object obj)
Overrides:
ContentSource.equals(Object obj)Parameters:
getRawValue
public String getRawValue()
Gets the original wire-format source string.
Returns:
hashCode
public int hashCode()
Overrides:
ContentSource.hashCode()parseAll
public static List<ContentSource> parseAll(String source)
Parses a semicolon-delimited string containing one or more source segments.
Each segment is parsed individually, detecting the source type automatically.
Parameters:
; delimiters).
Returns:
toRawString
public static String toRawString(List<? extends ContentSource> sources)
Reconstructs the wire-format source string by joining each element's getRawValue() with semicolons.
Parameters:
Returns:
toString
public String toString()
Returns the wire-format string representation of this source.
Overrides:
ContentSource.toString()Returns: