public class PropertyPath extends Object
Modifier and Type | Field and Description |
---|---|
static com.hp.hpl.jena.rdf.model.Property |
STAR
A fake property to denote the star operator in a property path
|
Modifier | Constructor and Description |
---|---|
|
PropertyPath()
Construct the empty path.
|
protected |
PropertyPath(PropertyPath parent,
String shortName,
com.hp.hpl.jena.rdf.model.Property uri)
Construct a new property path by adding a segment to the given path
|
|
PropertyPath(String path)
Construct a new path from an encoded path string.
|
|
PropertyPath(String[] segments)
Construct a new path from an array of the
shortName segments |
Modifier and Type | Method and Description |
---|---|
PropertyPath |
append(String shortName,
String uri,
ShortNameRenderer snr)
Return a new property path with a new segment at the end
|
boolean |
beginsWith(com.hp.hpl.jena.rdf.model.Property p,
ShortNameRenderer snr)
Return true if the given property matches the first segment in the path -
either because the path's shortname expands to the property URI, or because
the first segment of the path is
* . |
int |
size() |
com.hp.hpl.jena.rdf.model.Property |
terminal() |
String |
toHTMLString() |
protected String |
tokeniseWords(String name)
Tokenise the input string into words based on camelCase boundaries and hyphen characters.
|
String |
toString() |
public static final com.hp.hpl.jena.rdf.model.Property STAR
public PropertyPath(String path)
path
- A path encoded in shortName[.shortName]*
formpublic PropertyPath(String[] segments)
shortName
segmentssegments
- The segments of the path as an arrayIllegalArgumentException
- if the segments array is null or emptypublic PropertyPath()
protected PropertyPath(PropertyPath parent, String shortName, com.hp.hpl.jena.rdf.model.Property uri)
public String toString()
public String toHTMLString()
public int size()
public boolean beginsWith(com.hp.hpl.jena.rdf.model.Property p, ShortNameRenderer snr)
*
.p
- A property to testsnr
- Short name renderer for converting path shortnames to predicate URIspublic PropertyPath append(String shortName, String uri, ShortNameRenderer snr)
shortName
- The short name for the new segment, or nulluri
- The URI for the new segment, or nullsnr
- The short name service, which may be null if both shortName
and uri are non-null.<shortName>
appendedpublic com.hp.hpl.jena.rdf.model.Property terminal()
protected String tokeniseWords(String name)
name
- The input name to tokeniseCopyright © 2014. All Rights Reserved.