Index - All Packages - All Categories - All Classes
Class FeEdition
The kind of FeRangeElement that consists of an immutable organization of RangeElements, indexed by Positions in some CoordinateSpace.
R1 prohibits cyclic containment.
Set notation is used in the comments documenting some of the methods of this class. In each case the cleartext explanation stands alone, and the set notation is a separate, more formal, expression of the actions of the method, in terms of key(position)/label/value triples ("").
Package: Udanax-Gold
All Superclasses: Object Heaper FeRangeElement
Protocols: Object
Categories: Xanadu-nkernel
Class MethodsDIRECTU_CONTAINERSU_ONLY
For transcluders and works queries - only return objects which directly contain the sources of the query (ie. excludes those which only contain it transitively through intermediate Editions)
empty: keySpace
An empty Edition, with the given CoordinateSpace but no contents.
fromAll: keys with: value
Essential. A singleton Edition mapping from a Region of keys (potentially infinite) to a single value.
fromArray: values
Essential. Creates an Edition mapping from a Region of keys to the values in an array. The ordering specifies the correspondance between the keys and the indices in the array.
If a Region is given, then it must have the same count as the array. If no Region is given, then it is taken to be the IntegerRegion from 0 to the size of the array. If no OrderSpec is given, then it is the default ascending full ordering for that CoordinateSpace.
fromArray: values with: keys
fromArray: values with: keys with: ordering
fromOne: key with: value
A singleton Edition mapping from a single key to a single value.
FROMU_TRANSITIVEU_CONTENTS
For transcluders, and works queries - consider RangeElements contained transitively inside the Edition, as well as just its immediate RangeElements
IGNOREU_TOTALU_ORDERING
Used for retrieve. Allow non-contiguous chunks to be grouped together on retrieve, and allow the bundles to be presented in any order.
infostProtocol
Overrides: FeRangeElement class
LOCALU_PRESENTU_ONLY
For transcluders and works queries - only guarantee to return items which are currently known to this server
OMITU_SHARED
For cost - omit the cost of shared material
on: be
on: be with: label
otherTransitiveContents
For sharedWith/sharedRegion/notSharedWith
placeHolders: keys
Essential. Create a new Edition mapping from each key in the Region to a new, unique PlaceHolder. The owner will have the capability to make them become something else.
PRORATEU_SHARED
For cost - prorate the cost of shared material among Editions sharing it
SEPARATEU_OWNERS
For retrieve - ensure that each Bundle in a retrieve has a single owner
thisTransitiveContents
Used for version comparison.
TOTALU_SHARED
For cost - count the entire cost of shared material
TOU_TRANSITIVEU_CONTENTS
For sharedRegion, sharedWith, notSharedWith queries - look down towards transitively contained material
Instance MethodsaddCompletionDetector: detector
addFillInDetector: detector
addFillRangeDetector: detector
Essential. Connect a FillRangeDetector to the underlying BeEdition so that when any of the PlaceHolders in that Edition become any other kind of RangeElement, then the Detector will be triggered with an Edition containing the new RangeElements (but not necessarily at the same positions, or even in the same CoordinateSpace). If there already are non-PlaceHolders, then the Detector is triggered immediately with those RangeElements.
See FillRangeDetector::allFilled (Edition * newIdentities).
again
These don't change as long as someone has a handle on them.
Overrides: FeRangeElement
allBecome: newIdentities with: positions
asArray: positions with: ordering
beEdition
canMakeIdentical: newIdentity
Overrides: FeRangeElement
canMakeRangeIdentical: newIdentities
canMakeRangeIdentical: newIdentities with: positions
carrier
Return an object that wraps up any run-time state that might be needed inside the Be system. Right now that means labels.
Overrides: FeRangeElement
combine: other
Essential. Return a new FeEdition containing the contents of boththe receiver and the argument Editions, and with the label of the receiving edition; where they share positions, they must have the same RangeElement. Currently the two may not share positions. It is unclear whether to elevate this from an implementation restriction to a specification. The advantage of so specifying is that 'combine' becomes timing independent, ie. a failing combine could otherwise succeed after the differing range elements were unified (by FeRangeElement::makeIdentical()). See FeEdition::mapSharedOnto and FeEdition::transformedBy.
requires:
currently: is empty
eventually maybe: { k | v1 not same as v2
and in self and in other } is empty
coordinateSpace
Return the space in which the positions of this Edition are positions. Equivalent to
this->domain ()->coordinateSpace ()
copy: positions
Return a new FeEdition which is the subset of this Edition with the domain restricted to the given set of positions The new edition has the same label as this edition.
cost: method
Essential. Retiurn how much space this Edition is taking up on the disk, in bytes (but the precision may exceed the accuracy; it's simply a well-known unit). The method determines how material shared with other Editions is treated: if omitShared, it is not counted at all; if prorateShared, then it is divided evenly among the Editions sharing it; if totalShared, its entire cost is counted. This figure is only approximate, and may vary with time.
(No permissions are required to obtain this informiation, even though it exposes sharing by Editions you can't read to traffic analysis.)
count
Return the number of positions in this Edition. Blasts if infinite. Equivalent to
this->domain ()->count ()
create: beEdition with: label
destruct
Overrides: Heaper
domain
Essential. Return the region consisting of all the positions in this Edition. May be infinite, or empty.
endorse: additionalEndorsements
Essential. Adds to the endorsements on this Edition. The region of additionalEndorsements must consist of a finite number of (club ID, token ID) pairs. CurrentKeyMaster must hold the signature authority of all the Clubs used to endorse; the request will blast and do nothing if any of the required authority is lacking. (Redoing an endorse() undoes a retract())
endorsements
Essential. Return all of the endorsements which have been placed on this Edition and not retracted.
fetch: position
The value at the position, or nil if there is none
fetchBe
Overrides: FeRangeElement
fillRangeDetector
Essential. Return a FillRangeDetector so that when any of the PlaceHolders in this Edition become any other kind of RangeElement, then the Detector will be triggered with an Edition containing the new RangeElements (but not necessarily at the same positions, or even in the same CoordinateSpace). If there already are non-PlaceHolders, then the Detector is triggered immediately with those RangeElements.
See FillRangeDetector::allFilled (Edition * newIdentities).
get: position
Return the value at the given position, or blast if there is no such position (ie. if ! this->domain ()->hasMember (position)).
v : in self
requires: in self
getOrMakeBe
Overrides: FeRangeElement
hasPosition: position
Return whether the given position is in the Edition. Equivalent to
this->domain ()->hasMember (position)
includesKey: position
Whether the given position is in the Edition. Equivalent to
this->domain ()->hasMember (position)
isEmpty
Return whether there are any positions in this Edition. Equivalent to
this->domain ()->isEmpty ()
isFinite
Return whether there are a finite number of positions in this Edition. Equivalent to
this->domain ()->isFinite ()
isRangeIdentical: other
isRangeIdentical: other with: region
keysLabelled: label
keysOf: value
All of the keys in this Edition at which the given RangeElement can be found. Equivalent to
this->sharedRegion (theServer ()->makeEditionWith (some position, value)).
label
Overrides: FeRangeElement
makeIdentical: newIdentity
Overrides: FeRangeElement
makeRangeIdentical: newIdentities
makeRangeIdentical: newIdentities with: positions
mapSharedOnto: other
Return a mapping such that for each range element that appears in both editions, the mapping maps each of its appearances in the argument edition to some appearance in this one. (Some of the appearances in this edition may be unmapped or mapped to multiple appearances in the argument edition.) Like 'mapSharedTo' except that the resulting mapping is 'onto'. This means that each range position of the resulting mapping inverse maps to at most one domain position. Such a mapping is suitable as an argument to 'transformedBy', and represents the minimal transformation needed to make the shared part of 'other' from self. Note that there is no unique answer.
result = { | in self and in other and v1 is same as v2
and not exists k11 : k11 != k1 and in result }
Note that this is useful for optimization of FeBe communication and Frontend display updating.
mapSharedTo: other
Essential. Return a Mapping from each of the positions in this Edition to all of the positions in the other Edition which have the same RangeElement.
notSharedWith: other
notSharedWith: other with: flags
parcelAt: position
Some subset of this Edition, containing the given position, all with the same owner
parcels
Divides this Edition into pieces each of whose RangeElements are all owned by a single Club.
> | in self and k1 == v2's owner }
positionsLabelled: label
Return a region consisting of exactly the positions in this Edition which are associated with the given label.
positionsOf: value
Return the region consisting of all the positions in this Edition at which the given RangeElement can be found.
Equivalent to:
this->sharedRegion (theServer ()->makeEditionWith (some position, value)).
printOn: oo
Overrides: Object
rangeOwners: positions
The owners of all the RangeElements in the given Region, or in the entire
Edition if no Region is specified.
rangeTranscluders
rangeTranscluders: positions
rangeTranscluders: positions with: filter
rangeTranscluders: positions with: filter with: transitiveFilter
rangeTranscluders: positions with: filter with: transitiveFilter with: flags
rangeTranscluders: positions with: directFilter with: indirectFilter with: flags with: otherTranscluders
rangeWorks
rangeWorks: region
rangeWorks: region with: filter
rangeWorks: region with: filter with: flags
rangeWorks: positions with: filter with: flags with: otherTranscluders
rebind: position with: edition
Return a new FeEdition which is a copy of this Edition with the contained Edition at the given position replaced by the given Edition, but with the Label at that position unchanged. Equivalent to
this->with (position, edition->relabelled (this->get (position)->label ())).
Note that rebind() is useless (and blasts) when a non-edition RangeElement is at the given position.
{ | ((k isEqual: position) and (v is same as edition))
or ( in self and k != position) }
relabelled: label
Overrides: FeRangeElement
removeCompletionDetector: detector
removeFillInDetector: detector
removeFillRangeDetector: detector
Essential. Remove a Detector which had been added to this Edition. You should remove every Detector you add, although they will go away automatically when a client session terminates.
reorganize: oldRegion with: oldOrder with: newRegion with: newOrder
replace: other
Return a new FeEdition with the label of the current Edition and the contents of both Editions; where they share positions, use the contents and labels of the other Edition. Equivalent to
this->copy (other->domain ()->complement ())->combine (other).
retract: endorsements
Essential. Removes endorsements from this Edition. This requires that the CurrentKeyMaster hold signature authority for all of the Clubs whose endorsements are in the list; will blast and do nothing if any of the required authority is lacking, even if the endorsements weren't there to be retracted. Ignores all endorsements which you could have removed, but which don't happen to be there right now.
In the current release removed endorsements aren't preserved, so they vanish forever. Beginning in some future release removed endorsements will become inactive, but it will be possible to detect that they once had been present. The intent is for a removed endorsement to be analogous to a signature that has been struck out. You can express that you changed your mind, but you can't undo the past.
retrieve
retrieve: positions
retrieve: positions with: order
retrieve: region with: order with: flags
setAllOwners: newOwner with: region
setRangeOwners: newOwner
setRangeOwners: newOwner with: region
Changes the owner of all RangeElements in the Edition (but not the Edition itself!); requires the authority of the current owner of each range element. If a Region is supplied, then only sets those in the region.
Returns the subset of this Edition which is in the Region whose owners did not end up being the new Owner because of lack of authority.
sharedRegion: other
sharedRegion: other with: flags
sharedWith: other
sharedWith: other with: flags
stepper
stepper: region
stepper: region with: ordering
theOne
If this Edition has a single position, then return the RangeElement at that position; if not, blasts. Equivalent to
this->get (this->domain ()->theOne ())
transclusions: positions with: directFilter with: indirectFilter with: flags with: otherTransclusions
transformedBy: mapping
Essential. Return a new FeEdition containing the contents and label of the current Edition with the positions transformed according to the given Mapping. Where the Mapping takes several positions in the domain to a single position in the range, this Edition must have the same RangeElement and label at all the domain positions. Currently the mapping must be 'onto', ie., no more that one domain position may map onto any given range position. It is unclear whether to elevate this from an implementation restriction to a specification. See FeEdition::mapSharedOnto and FeEdition::combine.
requires:
Currently: not exists k1a, k1b : k1a != k1b and in mapping and in mapping.
Maybe eventually: for all v1, v2 : in result and in result, v1 is same as v2
unendorse: endorsements
visibleEndorsements
Essential. Return all the unretracted endorsements on this Edition along with those on any Works directly on it which the CurrentKeyMaster has permission to read.
with: position with: value
Return a new FeEditionwith the same contents and label as this Edition, except for the addition or substitution of a RangeElement at a specified position.
(The difference between with() and rebind() is exactly that rebind() preserves the old label at position, while with() installs the label attached to the value argument.)
Equivalent to:
this->replace (FeServer::current ()->makeEditionWith (position, value))
withAll: positions with: value
Return a new FeEdition with the same contents and label as this Edition, except at a specified set of positions, where the old values and labels, if there are any, are superceded by the value argument.
Equivalent to:
this->replace (FeServer::current ()->makeEditionWithAll (positions, value))
without: position
Return a new FeEdition with the same contents and label as this Edition, except at a specified position, where the old value and label, if there is one, is removed.
Equivalent to:
this->copy (position->asRegion ()->complement ())
withoutAll: positions
Return a new FeEdition with the same contents and label as this Edition, except at a specified set of positions, where the old values and labels, if there are any, are removed.
Equivalent to
this->copy (positions->complement ())
zoneAt: position
Essential. A zone containing the given position, all with the same kind of RangeElements.
zoneOf: values
zones: ordering
Divides this Edition up into pieces all of whose RangeElements have the same PrimSpec. If no ordering is given, then uses the default full ordering for this CoordinateSpace.
Index - All Packages - All Categories - All Classes