public class PropertyDef extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
PropertyDef.PropertyType
The type of the property.
|
Modifier and Type | Field and Description |
---|---|
protected int |
absoluteCardinality
The absolute number of occurrences of this property that must occur
|
protected String |
comment
The comment on this property
|
protected List<org.openrdf.model.URI> |
domain
The domain of the property
|
protected static HashMap<org.openrdf.model.URI,String> |
importMap
A map of XML Schema types to imports
|
protected int |
maxCardinality
The maximum number of occurrences of this property allowed
|
protected int |
minCardinality
The minimum number of occurrences of this property allowed
|
protected List<org.openrdf.model.URI> |
range
The range of the property (for Object properties)
|
protected PropertyDef.PropertyType |
type
The type of this property
|
protected static HashMap<org.openrdf.model.URI,String> |
typeMap
A map of XML Schema types to Java types
|
protected org.openrdf.model.URI |
uri
The URI of this property
|
protected static HashMap<org.openrdf.model.URI,URL> |
uriResolveMap
A map of URIs which must be resolved with the provided generator if it
exists
|
Constructor and Description |
---|
PropertyDef(Generator.GeneratorOptions go) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getDeclarationType()
Returns the Java declaration type for this property
|
protected static List<org.openrdf.model.URI> |
getURIList(org.openrdf.model.URI listNode,
org.openrdf.repository.RepositoryConnection conn)
For a given URI that represents a node in an RDF Collection, will returns
all the items in the list.
|
protected static List<org.openrdf.model.URI> |
getURIListBNode(org.openrdf.sail.memory.model.MemBNode bNode)
Gets a list of URIs from a bnode that's part of an RDF Collection.
|
int |
hashCode() |
List<String> |
needsImport(boolean implementation)
Returns the import required for the Java declaration of this property.
|
String |
toJavaDefinition(String prefix,
boolean generateAnnotations)
Outputs a Java definition for the property, including a comment if there
is a comment for the property.
|
String |
toSettersAndGetters(String prefix,
boolean implementations,
String delegationObject,
boolean indexedRatherThanCollections)
Generates setters and getters for the property.
|
String |
toString() |
protected static HashMap<org.openrdf.model.URI,String> typeMap
protected static HashMap<org.openrdf.model.URI,String> importMap
protected static HashMap<org.openrdf.model.URI,URL> uriResolveMap
protected org.openrdf.model.URI uri
protected PropertyDef.PropertyType type
protected int maxCardinality
protected int minCardinality
protected int absoluteCardinality
public PropertyDef(Generator.GeneratorOptions go)
go
- public String toString()
toString
in class Object
Object.toString()
public List<String> needsImport(boolean implementation)
implementation
- Whether we're generating implementations or interfacespublic String getDeclarationType()
public String toJavaDefinition(String prefix, boolean generateAnnotations)
Predicate
annotation will be generated for each declaration
containing the URI of the property. DataType properties will be encoded
as Strings and Object properties will be declared as their appropriate
type.prefix
- The String prefix to add to all lines in the generated codegenerateAnnotations
- Whether to generate @@Predicate annotationspublic String toSettersAndGetters(String prefix, boolean implementations, String delegationObject, boolean indexedRatherThanCollections)
prefix
- implementations
- delegationObject
- indexedRatherThanCollections
- protected static List<org.openrdf.model.URI> getURIList(org.openrdf.model.URI listNode, org.openrdf.repository.RepositoryConnection conn)
listNode
- The URI of the list nodeconn
- The repository connectionprotected static List<org.openrdf.model.URI> getURIListBNode(org.openrdf.sail.memory.model.MemBNode bNode)
bNode
- The Bnode