
public final class AggregationFunction extends FinalizedResource
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_DISTANCE_TO_REF_LOC |
static int |
MAX_OF |
static AggregationFunction |
maxDistanceToRefLoc |
static AggregationFunction |
maxOf |
static int |
MIN_DISTANCE_TO_REF_LOC |
static int |
MIN_OF |
static AggregationFunction |
minDistanceToRefLoc |
static AggregationFunction |
minOf |
static String |
MY_URI |
static int |
ONE_OF |
static AggregationFunction |
oneOf |
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, NAMESPACE_PREFIX, ns_delim_index, PROP_INVOLVED_HUMAN_USER, PROP_RDF_FIRST, PROP_RDF_REST, PROP_RDF_TYPE, PROP_RDFS_COMMENT, PROP_RDFS_LABEL, PROP_SERIALIZATION_FULL, PROP_SERIALIZATION_OPTIONAL, PROP_SERIALIZATION_REDUCED, PROP_SERIALIZATION_UNDEFINED, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, SERVICE_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uri, VOCABULARY_NAMESPACE| Modifier and Type | Method and Description |
|---|---|
static AggregationFunction |
getAggregationFunctionByOrder(int order)
Returns the order value of the AggregationFunction.
|
int |
getNumberOfParams()
Returns the number of parameters that must be given when using this
instance of
AggregationFunction. |
String |
getParameterType(int i)
Returns the type of the parameter that is needed for this
AggregationFunction. |
int |
getPropSerializationType(String propURI)
Answers if the given property has to be considered when serializing this
individual in a minimized way, and if not ignore-able, whether its value
should be presented in its full form or can be reduced.
|
boolean |
isWellFormed()
Returns true, if the state of the resource is valid, otherwise false.
|
String |
name()
Returns the human-readable name of this
AggregationFunction. |
int |
ord()
Returns the number of the order value(integer).
|
boolean |
setProperty(String propURI,
Object o)
Adds a statement with this resource as the subject, the given
propURI as the predicate and the given value as the object. |
static AggregationFunction |
valueOf(String name)
Returns the value of the AggregationFunction.
|
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfPropertiesaddMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getOrConstructLabel, getResource, getResourceComment, getResourceLabel, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isClosedCollection, isQualifiedName, literal, representsQualifiedURI, serializesAsXMLLiteral, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toString, toStringRecursive, toStringRecursive, unliteralpublic static final String MY_URI
public static final int ONE_OF
public static final int MIN_OF
public static final int MAX_OF
public static final int MIN_DISTANCE_TO_REF_LOC
public static final int MAX_DISTANCE_TO_REF_LOC
public static final AggregationFunction oneOf
public static final AggregationFunction minOf
public static final AggregationFunction maxOf
public static final AggregationFunction minDistanceToRefLoc
public static final AggregationFunction maxDistanceToRefLoc
public static AggregationFunction getAggregationFunctionByOrder(int order)
order - public static final AggregationFunction valueOf(String name)
name - can get null or the VOCABULARY_NAMESPACE valuepublic int getPropSerializationType(String propURI)
ResourceResource.PROP_SERIALIZATION_OPTIONAL,
Resource.PROP_SERIALIZATION_REDUCED, or Resource.PROP_SERIALIZATION_FULL.
It can be assumed that the given property is one of those returned by
Resource.getPropertyURIs(). PROP_SERIALIZATION_OPTIONAL in
favor of lower communication traffic and higher performance even at risk
of a possible additional query on the receiver side for fetching this
info. With the same rationale, if a property should be included in the
process of serialization, it is preferable to include it in a reduced
form; in this case the return value should be
PROP_SERIALIZATION_REDUCED, otherwise
PROP_SERIALIZATION_FULL can be returned.
Subclasses should normally overwrite this method as this default
implementation returns always PROP_SERIALIZATION_FULL.getPropSerializationType in class ResourcepropURI - the URI of the propertyResource.getPropSerializationType(String
propURI)public boolean isWellFormed()
isWellFormed in class Resourcepublic String name()
AggregationFunction.public int getNumberOfParams()
AggregationFunction.public String getParameterType(int i)
AggregationFunction.i - the index of the parameter.PropertyPath, the second parameter is always an
AbsLocation.PropertyPath,
AbsLocationpublic int ord()
public boolean setProperty(String propURI, Object o)
ResourcepropURI as the predicate and the given value as the object.
Subclasses must override this in order to decide if the statement to be
added fits the general class constraints. If not, the call of this method
should be ignored. For each property only one single call may be made to
this method, unless subsequent calls to this method for setting the value
of the same property are treated as an update for an update-able
property. Multi-valued properties must be set using an instance of
List. The differentiation, if a such list should be
treated as an rdf:List, can be made with the help of
Resource.isClosedCollection(String). The default implementation here
accepts all property-value pairs blindly except for rdf:type which is
handled if the value is a type URI, a Resource or a java.util.List of
them.
Note: The setting of the property rdf:type is being handled by this class
via the final methods Resource.addType(String, boolean),
Resource.getType(), and Resource.getTypes(). Although these methods give
the view of handling type URIs as strings, but in reality the types are
stored as direct instances of this class. So, the subclasses should
ignore calls for setting rdf:type; if not, then the subclass must pay
attention that the value should be a List of direct instances of
this class so that (1) the Resource.toString() method returns just the
URI and (2) the serializers get no problems with the value. Also,
settings via subclasses may be overwritten by this class if a subsequent
call to Resource.addType(String, boolean) is made.
setProperty in class ResourceResource.setProperty(String propURI,
Object value)Copyright © 2018 universAAL Consortium. All rights reserved.