|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.schema.elements.SchemaPath
public class SchemaPath
Path specification within a schema definition. This implements simple XPath-like expressions, consisting of any number of path components given as element names or '*' for any element or '**' for any nesting of elements, along with optional position number or name attribute predicates in square brackets.
| Nested Class Summary | |
|---|---|
static class |
SchemaPath.PathStep
|
static class |
SchemaPath.StepBase
|
| Method Summary | |
|---|---|
static SchemaPath |
buildPath(String path,
String elemname,
String nameattr,
String postext,
Object obj,
ValidationContext vctx)
Build a path. |
int |
getPathLength()
Get length of this path (minimum number of nested elements). |
boolean |
isWildStart()
Check if the first path step is a wildcard. |
OpenAttrBase |
matchUnique(OpenAttrBase base)
Find unique match for expression starting from a supplied schema element annotation. |
List |
partialMatchMultiple(int first,
int last,
OpenAttrBase base)
Find any number of matches for subexpression starting from a supplied schema element annotation. |
OpenAttrBase |
partialMatchUnique(int first,
int last,
OpenAttrBase base)
Find unique match for subexpression starting from a supplied schema element annotation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public int getPathLength()
public boolean isWildStart()
true if wildcard, false if not
public List partialMatchMultiple(int first,
int last,
OpenAttrBase base)
first - starting path step indexlast - ending path step indexbase - starting element for match
null if error
public OpenAttrBase partialMatchUnique(int first,
int last,
OpenAttrBase base)
first - starting path step indexlast - ending path step indexbase - starting element for match
null if errorpublic OpenAttrBase matchUnique(OpenAttrBase base)
base - starting element for match
null if error
public static SchemaPath buildPath(String path,
String elemname,
String nameattr,
String postext,
Object obj,
ValidationContext vctx)
path - expression (null if none)elemname - element name for final step in pathnameattr - name attribute (applied to final step in path, null if none)postext - position (applied to final step in path, null if none)obj - object defining the pathvctx - validation context
null if error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||