Class: RDF::Literal::PositiveInteger
- Inherits:
-
NonNegativeInteger
- Object
- RDF::Literal
- Numeric
- Decimal
- Integer
- NonNegativeInteger
- RDF::Literal::PositiveInteger
- Defined in:
- vendor/bundler/ruby/2.0.0/bundler/gems/rdf-xsd-7726559c0772/lib/rdf/xsd/integer.rb
Overview
positiveInteger is derived from nonNegativeInteger by setting the value of minInclusive to be 1. This results in the standard mathematical concept of the positive integer numbers. The value space of positiveInteger is the infinite set [1,2,...]. The base type of positiveInteger is nonNegativeInteger.
Constant Summary
- GRAMMAR =
/^\+?\d+$/.freeze
- DATATYPE =
RDF::XSD.positiveInteger
Constants inherited from RDF::Literal
Instance Attribute Summary
Attributes inherited from RDF::Literal
Instance Method Summary (collapse)
Methods inherited from Integer
#abs, #canonicalize!, #even?, #initialize, #nonzero?, #odd?, #pred, #round, #succ, #to_bn, #to_s, #zero?
Methods inherited from Decimal
#abs, #canonicalize!, #ceil, #floor, #initialize, #nonzero?, #round, #to_s, #zero?
Methods inherited from Numeric
#*, #+, #+@, #-, #-@, #/, #<=>, #==, #abs, #ceil, #floor, #round, #to_d, #to_f, #to_i, #to_r
Methods inherited from RDF::Literal
#==, #anonymous?, #canonicalize, #canonicalize!, #comperable_datatype?, #eql?, #has_datatype?, #has_language?, #hash, #initialize, #inspect, #literal?, #object, #plain?, #simple?, #to_base, #to_s, #validate!, #value, #value_hash
Methods included from Term
#<=>, #==, #compatible?, #eql?, #escape, #evaluate, #term?, #to_base
Methods included from SPARQL::Algebra::Expression
cast, #constant?, #evaluate, extension, extensions, for, new, open, #optimize, parse, register_extension, #to_sxp_bin, #variable?
Methods included from Value
#anonymous?, #constant?, #graph?, #inspect, #inspect!, #invalid?, #iri?, #list?, #literal?, #node?, #resource?, #statement?, #term?, #to_nquads, #to_ntriples, #to_rdf, #type_error, #uri?, #validate!, #variable?
Constructor Details
This class inherits a constructor from RDF::Literal::Integer
Instance Method Details
- (Boolean) valid?
135 136 137 |
# File 'vendor/bundler/ruby/2.0.0/bundler/gems/rdf-xsd-7726559c0772/lib/rdf/xsd/integer.rb', line 135 def valid? super && @object > 0 end |