CN101501685A - Personalizable information networks - Google Patents

Personalizable information networks Download PDF

Info

Publication number
CN101501685A
CN101501685A CNA2006800305569A CN200680030556A CN101501685A CN 101501685 A CN101501685 A CN 101501685A CN A2006800305569 A CNA2006800305569 A CN A2006800305569A CN 200680030556 A CN200680030556 A CN 200680030556A CN 101501685 A CN101501685 A CN 101501685A
Authority
CN
China
Prior art keywords
name
null
int
public
author
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2006800305569A
Other languages
Chinese (zh)
Inventor
M·F·希尔曼
S·拉曼
A·瑟罗希
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Microsoft Corp
Original Assignee
Microsoft Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Microsoft Corp filed Critical Microsoft Corp
Publication of CN101501685A publication Critical patent/CN101501685A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A facility for implementing personalizable information is described. The facility includes callable wrappers, database-related COM technologies, asynchronous operations with impersonation, views, XML updategram, XHTML updategrams, PRL/href/ld conversion, ACLs treated as databases, database setup, framework for expressing structured data, and search integrated scroll bar.

Description

The realization of personalizable information
The cross reference of related application
The application requires in the rights and interests of the 60/710th, No. 857 U.S. Provisional Application of submission on August 24th, 2005, and this provisional application all is incorporated into this by reference.The application also requires in the rights and interests of the 60/711st, No. 580 U.S. Provisional Application of submission on August 25th, 2005, and this provisional application all is incorporated into this by reference.
Background technology
In decades, computing machine by networking so that swap data betwixt.An important network, promptly the internet comprises a large amount of computing machines and the computer network that interconnects by the computing machine channel.There are many purposes the internet, comprise ecommerce, the exchange as the Email information, retrieving information and make a search or the like.For exchange message on the internet and set up many standards, such as Email, Gopher and WWW (" WWW ").Web services makes server computer system (being web server or website) send to the remote client system to the graphical web pages of information.So the remote client computing system can display web page.Each resource of WWW (for example computing machine or webpage) can be carried out unique sign by a URL(uniform resource locator) (" URL ").In order to check a particular Web page, client computer system is specified the URL of this webpage in a request (for example, HTML (Hypertext Markup Language) (" HTTP ") request).This request is forwarded to the web server of supporting this webpage.When this web server received request, it was sent to client computer system to the webpage of being asked.When client computer system received this webpage, it showed this webpage with a browser usually.Browser normally is used to ask the vertical application with display web page.
At present, webpage uses HTML (Hypertext Markup Language) (" HTML ") to define usually.HTML provides the tag set of a standard, how to have defined display web page.When the user when browser is made the request of display web page, browser sends to server computer system to request so that transmit the html document of this webpage of definition to client computer system.When the html document of being asked was received by client computer system, browser display was by the defined webpage of this html document.Html document comprises the various labels of the demonstration that is used for controlling text, figure, control and other feature.Html document can be included in this server computer system or the URL of other available webpages on other server computer systems.
There is new agreement, such as extend markup language (" XML ") and WAP (wireless access protocol) (" WAP ").XML has more dirigibility than HTML.WAP provide browsing page on hand-held, wireless device ability, or the like, described hand-held wireless device is such as mobile phone and portable computer (as PDA).All these agreements all provide more or less freely mode to come by various data processing equipments information to be offered people.For further help information exchange, continued to develop many other and be used for agreement and device at the data processing equipment swapping data.
Description of drawings
Fig. 1 is the block diagram that can adopt the basic and suitable computing machine of each side of the present invention.
Fig. 2 A is the block diagram of the simple and suitable system of illustration one, and each side wherein of the present invention can be worked in the computer environment of a networking.
Fig. 2 B is the block diagram of illustration to the replacement system of Fig. 2 A system.
[note: the title that provides here only for simplicity, and unnecessary influence scope of the present invention or implication.]
Embodiment
Each embodiment of the present invention will be described now.Below describing provides the detail that is used for thorough and describes these embodiment.Yet those skilled in the art can understand, and does not have many these details also can realize the present invention.In addition, for avoiding unnecessarily obscuring the associated description of each embodiment, do not specifically illustrate or describe some known structure or functions.
The term Ying Yiqi that uses in below describing implication the most widely explains, even it uses in conjunction with the detailed description of some specific embodiment of the present invention.Some term may emphasize following, yet in this embodiment trifle, any term that will explain in the narrow sense mode all can be obviously and special definition.
Fig. 1 and following discussion provide concise and to the point, the general description to the suitable computing environment that wherein can realize each side of the present invention.Although do not need, each side of the present invention and each embodiment can describe with the general context of computer executable instructions, for example by server or the so performed routine of multi-purpose computer of personal computer.Those skilled in the relevant art will appreciate that, the present invention can realize with other computer system configurations, comprise internet apparatus, handheld device, can wear computing machine, honeycomb or mobile phone, multicomputer system, based on consumer electronics microprocessor or programmable, set-top box, network PC, microcomputer, mainframe computer or the like.The present invention may be embodied in special purpose computer or the data processor, and it is specifically programmed, disposes or construct the one or more computer executable instructions that describe in detail below to carry out.In fact, the general here term " computing machine " that uses is meant any the said equipment and any data processor.
The present invention can realize in distributed computing environment that also wherein task or module are by carrying out by the teleprocessing equipment of communication network link, and described communication network is LAN (Local Area Network) (" LAN "), wide area network (" WAN ") or internet for example.In distributed computing environment, program module or subroutine can be arranged in local and remote memory storage device.The following description of the present invention each side can be stored in or be distributed in comprise magnetic or optical readable and movably on the computer disks computer-readable medium, with chip (for example EEPROM chip) be stored as firmware and be distributed in the internet electronically or other networks (comprising wireless network) on.Those skilled in the relevant art will appreciate that a plurality of parts of the present invention can reside on the server computer, and corresponding simultaneously part resides on the client computers.Data structure and the data transmission relevant especially with each side of the present invention are also contained in the scope of the present invention.
With reference to Fig. 1, one embodiment of the present of invention have adopted such as personal computer or the such computing machine 100 of workstation, and it has the one or more processors 101 with one or more user input devices 102 and data storage device 104 couplings.Computing machine also is coupled at least one output device, such as display device 106 and one or more other optional output devices 108 (for example, the output device of printer, draught machine, loudspeaker, sense of touch or sense of smell, etc.).Computing machine can be coupled to outer computer, such as connect 110 by optional network, wireless transceiver 112 or both.
Input equipment 102 can comprise keyboard and/or the positioning equipment as the mouse.Other input equipments also are possible, such as microphone, joystick, pen, cribbage-board, scanner, digital camera, video camera etc.Data storage device 104 can comprise that can store can be by the computer-readable medium of any kind of the data of computing machine 100 visit, for example magnetic hard-disk and floppy disk, CD drive, magnetic cassette tape, tape drive, flash card, digital video disc (DVD), Bei Nuli (Bernoulli) electric bridge, RAM, ROM, smart card etc.In fact can use anyly to be used for storing or the medium of sending computer instructions and data, be included in the connectivity port of network or the node on the network, described network is Local Area Network, wide area network (WAN) or internet (Fig. 1 is not shown) for example.
Each side of the present invention can realize in multiple other computing environment.For example, with reference to Fig. 2 A, the distributed computing environment that has the web interface is shown in system 200, comprises one or more subscriber computers 202, each subscriber computer all comprises a browser program module 204, it makes calculates function internet 206 visit and swap datas, is included in the interior website of WWW part of internet.The computing machine of describing with reference to Fig. 1 above subscriber computer can be substantially similar to.Subscriber computer can comprise other program modules, for example operating system, one or more application program (word processing or electronic chart application program) etc.Computing machine can be the common apparatus that is programmed with operation types of applications program, and perhaps they can be optimised or be defined as the single-use equipment of a specific function or function class.The more important thing is,, can adopt any application program that is used for providing graphic user interface, as detailed below to the user although illustrate with the web browser; The use at web browser and web interface only is used as a familiar example at this.
Carry out with at least one server computer 208 of internet or WWW (" Web ") 206 couplings be used for receiving, route and storage be as the major part or the repertoire of webpage, sound signal and the such a electronic information of electronic chart.Although the internet is shown, may tend to use private network in some applications as the Intranet.Network can have one client computer-server architecture, and wherein a computing machine is exclusively used in other client computers of service, perhaps also can have to resemble point-to-point other such structures, and wherein one or more computing machines serve as server and client computer simultaneously.And most of webpage and content that a database 210 of server computer coupling or a plurality of database storing exchange between subscriber computer.The server computer that comprises database can adopt security means to come malicious attack in the prevention system; and the integrality of message that assurance is wherein stored and data (for example, firewall system, encryption socket layer (SSL), cryptoguard scheme, encryption or the like).
Server computer 208 can comprise server engine 212, management of webpage assembly 214, Content Management assembly 216 and data base administration assembly 218.Server engine is carried out basic processing and operating system layer task.The management of webpage assembly is handled establishment and the demonstration or the route of webpage.The user can visit it by the URL relevant with server computer.In the following embodiments, the Content Management assembly is handled most of function.The data base administration assembly comprises about the storage of database and retrieval tasks, to the inquiry of database and the storage of the data as video, figure and sound signal.
With reference to Fig. 2 B, an alternative embodiment of system 200 is shown as system 250.System 250 is substantially similar to system 200, but comprise a more than server computer (be depicted as server computer 1,2 ... J).Load on the several server computers of load balance system 252 balances.Load balance is the technology that is used for distribution process load between two or more computing machines as known in the art, thus more effectively processing instruction and route data.This load balancer message traffic that can distribute is particularly in the peaked traffic time.
Distributed file system 254 the web server be coupled to several databases (be depicted as database 1,2 ... J).Distributed file system is a class file system, wherein file system itself management and locate information (for example content page) from telefile or database pellucidly and the distributed document on the network as LAN.Distributed file system is also managed from database and is read function and function is written to wherein.
The further details of at least one embodiment of the present invention is provided below.
Usually, the detailed description of various embodiments of the present invention is not limit, the present invention is not restricted to yet and only limits to disclosed content.Although described specific embodiment of the present invention and example above for purposes of illustration, yet it will be understood by those skilled in the art that the modification of various equivalences also is feasible within the scope of the present invention.For example, though process or square frame illustrate with given order, other embodiment can carry out the routine with different steps in order, perhaps adopt to have the system of different order square frames, and some processes or square frame can be deleted, mobile, add, segmentation, combination and/or modification.Each of these processes or square frame can realize with multitude of different ways.Equally, though processing sometimes or square frame are depicted as order execution in time, the execution that these processes or square frame also can walk abreast in time perhaps can be carried out constantly in difference.
Each side of the present invention can be stored in or be distributed on the computer-readable medium, comprises the readable computer disks of magnetic or light, rigid line or pre-programmed chip (for example EEPROM semiconductor chip), nanometer technology storer, biological memory or other data storage media.In fact, computer implemented instruction, data structure, screen display and according to other data of each side of the present invention can be in the internet or other networks (comprising wireless network) go up distribute, can be (for example at the transmitting signal of a period of time on a propagation medium, electromagnetic wave, sound wave etc.) go up distribution, perhaps they can provide on any (packet switch, that circuit switches or other schemes) analog or digital network.Those skilled in the art will recognize that, a plurality of part of the present invention can reside on the server computer, and corresponding simultaneously part resides on the client computers that image drift is moving or portable set is such, therefore, although described specific hardware platform here, each side of the present invention equally also can be applicable to the node on the network.
Here the principle of the present invention that provides can be applicable to other system, and and nonessential system described herein.The element of each embodiment described here and action can be made up so that other embodiment to be provided.
Consider above embodiment, can make these and other variation the present invention.Though foregoing description understands each embodiment of the present invention specifically and also described the optimal mode of being conceived, yet how detailed the description of text is no matter, and the present invention also can realize in many ways.Details of the present invention realizes can changing significantly on the details at it, and is comprised by invention disclosed herein simultaneously.As mentioned above, describe special characteristic of the present invention or aspect the time used particular term should not be used for meaning this term and be defined herein as and be restricted to this term any specific feature of the present invention associated therewith, characteristic or aspect.Usually, employed term should not be restricted to disclosed specific embodiment in the instructions to the present invention in claims, unless specifically defined such term in embodiment.In addition, actual range of the present invention not only comprises the disclosed embodiments, but also comprises realization all equivalents of the present invention.
Defined some features below:
1. can call bag (CW)." can call bag " layer is easy to realize com object in .NET, and realizes the .NET object in the non-management code.System of the present invention compiles system than simple interface and more can expand.Particularly, it makes you can create the diverse interface that is applicable to .NET or COM, and provides between them than simply compiling more powerful conversion layer.It uses COM that the many interfaces that provide from single .NET object are provided to compile.Created the ability among .NETs handled feasible originally in the non-management field.Be the representative tabulation below:
A. in .NET, set up index server filtrator (Index Server Filter)
B. in .NET, set up the IE expansion, comprise tool bar
C. in .NET, set up Shell expansion (Shell Extension)
D. in .NET, set up context menu (Context Menus)
E. in .NET, visit the MAPI (Extended MAPI) of expansion
F. in .NET, visit NT daily record API (NT Journal APIs)
Html object model among the g..NET (Object Model) visit
H. arrive common IDispatch incident (the Generic IDispatch Event) mapping of .NET incident
2. the relevant COM technology of database.We have write a COM API and have allowed people to realize institute's storing process of expanding.Also having write a simple COM API realizes using IEnumXXX only simply to transmit OLEdb row set.Existing ATL infrastructure only supports to be carried in fully on the data structure row set in the storer.Realization of the present invention can be returned you and be built as capable result when request.
3. the asynchronous operation of playing the part of.Created the asynchronous operation when a .NET infrastructure allows the user to play the part of.This meticulous infrastructure allows operation by asynchronous or synchronously write, allow nested operation and have built-in mistake or have built-in capabilities to come propagate errors and progress information.
4. view.Created a model that is used for XML definition view.This model can be defined as the assembly on the element-specific that is used for source data.One view compilation device is provided then, and it is compiled as this model for the specific form of each export technique, for example XSLT and ASP.Crucial innovation is that view definition of the present invention and their included assemblies are independent of any specific technology of checking.
5.XML upgrade figure (XML Updategram).Defined a kind of user's intuition file layout and described variation any XML document.More format is identical with unprocessed form, does not almost influence the more note of neology.One algorithm is provided, and it uses original document, renewal document and model information to use renewal figure and to generate a new document.Update algorithm has special support so that upgrade renewal figure itself.This technology is applied to the many different situation in the product.
A. edit instrument panel, check
B. use and upgrade the semantic drawing template establishment document of figure
C. owing to the compact nature of renewal figure allows Ajax type documents editing on the http
D. support better multi-user's semanteme by reducing conflict.
6.XHTML upgrade figure (XHTML Updategrams).It is the concrete form of above-mentioned XML renewal figure semanteme, acts on the XHTML file layout.Provide a kind of code to realize, it sets the movable HTML that this renewal figure is applied in the browser.Use the IMarkupServices in the browser to support the variation of tree being made necessity.In addition, make up renewal figure and know that XSLT can change the XML renewal figure of compatible model to generate XHTML renewal figure.
7.PRL/Href/ld conversion.A kind of system that is used for fast and for good and all " this locality " title (being exclusively used in the specific names name in a name space claims) being converted to adopted name is provided.Some features comprise: the 1) work on any amount of local name space, 2) general ID is created occur on any machine and acted on any other machine of this system of use.
8. be considered as the ACL of database.Various ACL containers (document, another name, token) are regarded as the ACL form.This makes various ACL renewal/merger activitys occur in the process that conduct is stored in the database fully, and the process of being stored can be improved performance and can realize complex characteristic.
9. database setting.Developed a kind of database definition language, and read this XML and generate or the processor of new database more based on XML.Many features are built in this (also can have more).Feature comprises the constant of defining named, when being provided with the defining named of (still be unrealized but design) assessment expression, foreign key concerns, index and constraint and the definition of core row are mutually integrated form definition, based on the ability of XML table initialization data.
10. be used to represent the framework of structural data.Insert in the microsoft sql server database for the data of effectively the .NET parts being returned, developed a kind of framework, it can be shown as OLEDB to any stream of the structural data that is returned by managed code device row set is provided.Framework is subjected to metadata driven, and uses Win32IPC function (such as named pipe and other).The common OLEDB that its is realized and microsoft sql server moves in same process provides device, is the request fluidisation to the data imported with the T-SQL language .NET code effectively and the data stream of being returned is shown as OLEDB row set.This framework provides sane realization for all required OLEDB interfaces of returning metadata and the results set dynamically found from the result that the .NET parts reflux.Because having used fluidisation pattern, this framework is that performance and internal memory are effective, and can begin consumption data when the .NET code still bears results.
11. search for integrated scroll bar (click on the scroll bar is shown).View of today has two kinds of search to support: a) along with user's typing character sequence, view is rolled into the position that the value of institute's sort field and the literal of so far keying in are complementary.Example is arranged according to the from field in the inbox, and keys in the name that rolls.B) user keys in some search text, and view filters every so that the content that is complementary with search criterion only is shown.Search scroll bar feature is not filtered or is required row are sorted.Search is finished on the scope of viewed item.The result of occurrence is by there being the expression that brings of expression institute occurrence on scroll bar.The user can bring by the colour on the click on scroll bar and easily be rolled into the item of being paid close attention to.The interesting application of this feature is a historical view.People remember the something that they take place often near the moment of doing a certain specific activities or search.By using this scroll bar characteristic, user's this point in the history that can roll is to determine that url that they are searched is whether in tabulation.
XML Update Gram (XML upgrades figure).The script target of xml renewal figure is to search a form based on intuitive criteria that can upgrade any XML document.This is in order to upgrade data-base recording rather than pure tree form data structure.The another kind of characteristic of web is that xml renewal figure is very xml's and very detailed.Yet it is not a standard.Defined a kind of new grammer, it looks the unprocessed form that more looks like almost not have attribute.This method makes the conventional well renewal of form degradation, and more directly perceived.
UpdateGram Attributes (upgrading the figure attribute).As mentioned above, the renewal bitmap-format is identical with source document form (the actual file form that it is influencing).The all elements name is all identical with unprocessed form with layering, and may not introduce new layering element.Yet,, have the attribute labeling how description upgrades destination document by the xml layering.The description of attribute and their implication.
Below the xaug:op or xaug:operation value and the implication that this attribute allows
" new ": insert this node and default all its contents of replacing
" update ": another node in this node and the destination document is complementary and upgrades it
" delete ": another node in this node and the destination document is complementary and deletes it
If attribute is not present in given node.Default value is inherited from father node.Under the root node situation, this defaults to " new ".
Xaug:sel or xaug:select: this attribute is the destination node that will be affected in the destination document in order to search.Even noticing this attribute also is significant when being operating as " new ".By using " new " to select, can replace this node effectively rather than only upgrade it.Select attribute that various forms is arranged.
[absent or empty]: if once (for example root node) only appears in node in this pattern, then it only with a node matching.Usually, each node type has defined its default selection attribute.For example, if mark has a primary key, it can impliedly use key word as selection.Therefore do not need regulation to select statement, as long as have primary key (" id ") attribute just enough on the node.
" 46 ": this value that provides is used to mate the primary key of present node type to search destination node
" [@id=' 46 '] ": it is the xpath expression formula of moving on the target of father node, is used to search
Formerly be not used as first node another source node and target matches criteria.
Xaug:pos or xaug:position: this attribute is in order to upgrade or replacement back location node.The syntax format of this attribute is " [source-match]〉[target-match] " or " [source-match]<[target-match] ".Source-match is defined as insertion/renewal to the particular community on the source node.Target-match is the xpath expression formula that is used for the Search and Orientation node on target-father.Mean new node after be inserted into,<mean be inserted into before.This attribute has many variants.
[absent or empty]: if operation does not have target (brand-new node), then it is arranged in the bottom of father and son's tabulation.If destination node is arranged, it does not just change its position.
"〉" and "<": this means bottom and top father tabulation respectively.
" rank〉" and " rank<": it means the insertion node, and tabulation is arranged with ascending order." rank<" means the insertion node, and tabulation is with descending sort.
"〉[@id=75] " or "<46 ": use explicit xpath expression formula or by supposing that this value is used for primary key and creates.Search the node of all and matches criteria now." if〉", then in the end insert it after one.If "<" then inserted it before first.If do not find these clauses and subclauses, then insert at the bottom and the top of tabulation respectively.
" [source-match]〉[target-match] ": by according to "〉" attribute of ascending order or the appointment of "<" descending arranges selected node on the target, thereby is combined to the xpath expression formula.Then determine the insertion point by the currency that is inserted into node.
Xaug:aop or xaug:attributeoperation: this attribute defaults to the xaug:op attribute usually.Yet under specific situation,, use this attribute if attribute is expected to have the new behavior of the replacement that is different from child node/more.For example, if wish to replace all properties on the node but influence child node, then:
<mynode?xaug:op=″update"xaug:aop=″new″attr1=″foo″attr2″bar″/>
Update Algorithm (update algorithm).Rudimentary algorithm is a traversal renewal source tree.Find suitable destination node.If operation is newly-built new, then point is to start with set in the use source.If operation is to upgrade update, then use goal tree point to start with.Even order is " new ", also keep the coupling that destination node is used for child node.Can in " new ", comprise " update ".In case determined the end-state of node, determined whether to move to different positions with regard to the use location attribute.This is by recursively finishing in each node layer.
XA UpdateGram (" xaug ") grammer.
Insert Data (insertion data).At the selected node of XPath expression formula place given data are inserted the XML tree.Data can be inserted into before the selected node, afterwards or among.The data of being inserted can be literal or XML subtree.
<xaug:sync?xmlns:xaug="http://www.trimergent.com/xaug">
<xaug:insert?location="beforelinlafter"select="XPath?expr">
Element?data(literal?or?XML)
</xaug:insert>
</xaug:sync>
Add Attribute (interpolation attribute).The attribute that has specified title and data is added to by the selected element of XPath expression formula.
<xaug:sync?xmlns:xaug="http://www.trimergent.com/xaug">
<xaug:insert-attr?select="XPath?expr">
<xaug:attribute?name="..."value="..."/>
</xaug:insert-attr>
</xaug:sync>
Update Data (more new data).Replacement is by the data in the selected element of XPath expression formula.Data can be literal or XML subtree.
<xaug:sync?xmlns:xaug="http://www.trimergent.com/xaug">
<xaug:update?select="XPath?expr">
Element?data(literal?or?XML)
</xaug:update>
</xaug:sync>
Update Attribute (renewal attribute).Replace property value with the create name in the selected element of XPath expression formula.
<xaug:sync?xmlns:xaug="http://www.trimergent.com/xaug">
<xaug:update-attr?select="XPath?expr">
<xaug:attributename="..."value="..."/>
</xaug:update-attr>
</xaug:sync>
Delete Element (deletion element).The deletion selected element of XPath expression formula and all its subdatas.
<xaug:sync?xmlns:xaug="http://www.trimergent.com/xaug">
<xaug:delete?select="xPath?expr"/>
</xaug:sync>
Delete Attribute (delete property).The attribute that deletion has given title in the selected element of XPath expression formula.
<xaug:sync?xmlns:xaug="http://www.trimergent.com/xaug">
<xaug:delete-attr?select="XPath?expr"name="..."/>
</xaug:sync>
query.dsi
<?xml?version="1.0"encoding="utf-8"?>
<dbsetup?xmlns="http://tempuri.org/dbinit.xsd">
<database?name="xa">
<local?name="rsfNone" value="0x00000000"/>
<local?name="rsfMatched"?value="0x00000100"/>
<local?name="rsfOverlaid"value="0x00010000"/>
<local?name="rsfPinned" value="0x01000000"/>
<local?name="maxrorder" value="0x7fffffff"/>
<table?name="query">
<column?name="id"type="int"identity="true"primary="true"/>
<column?name="dummy"type="int"/>
</table>
<table?name="queryplan">
<column?name="id"type="int"identity="true"primary="true"/>
<column?name="queryid"type="int"foreignkey="query.id"/>
<column?name="sourceid"type="int"/>
<column?name="sourcetype"type="int"/>
<column?name="rsid"type="bigint"/>
<column?name="urlid"type="int"foreignkey="iteminfo.id"/>
<column?name="args"type="nvarchar(256)"/>
<column?name="topn"type="int"/>
<column?name="rorder"type="int"/>
<column?name="usn"type="bigint"/>
<index?name="ix_queryplan">
<column?name="queryid"index="asc"/>
<column?name="rorder"index="asc"/>
</index>
</table>
<function?name="QreidFromRreid">
<param?name="sourceid"type="int"/>
<param?name="reid"type="int"/>
<returns?type="int"/>
<source>
DECLARE?@qreid?int
IF?@reid?&lt;0
SET?@qreid=-@sourceid*POWER(2,16)+@reid
ELSE
SET?@qreid=@reid
return(@qreid)
</source>
</function>
<function?name="RorderFromSourceType">
<param?name="souroetype"type="int"/>
<returns?type="int"/>
<source>
RETURN?CASE?@sourcetype
WHEN?$rstNative$?THEN?$rsfPinned$
WHEN?$rstSearch$?THEN?$rsfMatched$
WHEN?$rstOverlay$?THEN?$rsfOverlaid$
WHEN?$rstOverlaySearch$?THEN?$rsfMatched$
WHEN?$rstRelated$?THEN?$rsfNone$
WHEN?$rstBacklink$?THEN?$rsfNone$
WHEN?$rstPlan$?THEN?$rsfNone$
ELSE?$rsfNone$
END
</source>
</function>
<function?name="RsuborderFromSourceIdAndRowNum">
<param?name="sourceid"type="int"/>
<param?namc="rownum"type="int"/>
<returns?type="bigint"/>
<source>
RETURN?@sourceid*POWER(CAST(2AS?bigint),32)+@rownum
</source>
</function>
<view?name="qrraw">
<source>
SELECT?queryid,sourceid,sourcetype,queryplan.rsid,
dbo.QreidFromRreid(sourceid,reid)ASqreid,
reid,
rowtype,value,rorder,
dbo.RsuborderFromSourceIdAndRowNum(sourceid.rownm)AS
rsuborder
FROM?queryplan?INNER?JOIN
resultcache?ON?queryplan.rsid=resultcache.rsid
</source>
</view>
<view?name="qreraw">
<source>
SELECT?queryid,sourceid,rsid,reid,qreid,rorder,rsuborder
FROM?qrraw
WHERE(rowtype=$rteLink$)UNION
SELECT?queryid,sourceid,rsid,0,0,MAX(rorder),MIN(rsuborde
FROM?qrraw
WHERE(sourcetype=$rstNative$?OR?sourcetype=SrstPlan$)AND
reid=0
GROUP?BY?queryid,sourceid,rsid
</source>
</view>
<view?name="qrefinal">
<source>
SELECT?qreraw.queryid,qreraw.rsid,qreraw.reid,
qreorder.rorder,qreorder.rsuborder
FROM(SELECT?queryid,qreid,
CASE?qreid?WHEN?0?THEN?$maxrorder$?ELSE
SUM(rorder)+(0xFF-
MIN(sourceid))END?AS?rorder,
MIN(rsuborder)AS?rsuborder
FROM?qreraw?GROUP?BY?queryid,qreid)qreorder
INNER?JOIN?qreraw?ON?qreorder.queryid=qreraw.queryid
AND?qreorder.qreid=dbo.qreraw.qreid
</source>
</view>
<view?name="qrfinal">
<source>
SELECT?TOP?100?PERCENT?qrraw.queryid,sourceid,qreid?AS?reid,
rowtype,value
FROM?qrefinal
INNER?JOIN?qrraw?ON
qrefinal.queryid=qrraw.queryid
AND?qrefinal.rsid=qrraw.rsid
AND?qrefinal.reid=qrraw.reid
ORDER?BY?qrefinal.rorder?DESC,qrefinal.rsuborder?ASC,
CASE?WHEN?rowtype?&gt;=$RTESOURCEFIRST$?AND
rowtype?&lt;=$RTESOURCELAST$?AND
qreid!=0
THEN?$RTESOURCEFIRST$
ELSE?rowtype
END?ASC,
sourceid,
rowtype?ASC,
qrraw.rsuborder?ASC
</source>
</view>
<view?name="qrbacklink">
<source>
SELECT?DISTINCT?groupinginfoex.groupurlid?AS?urlid,
queryplan.queryid
FROM?queryplan
INNER?JOIN?resultcache?ON?queryplan.rsid=
resultcache.rsid
INNER?JOIN?groupinginfoex?ON?resultcache.reid=
groupinginfoex.urlid
WHERE?resultcache.rowtype=$rteLink$
</source>
</view>
<view?name="qrplanentries">
<source>
SELECT
queryplan.queryid,
queryplan.id?AS?rownum,
iteminfoex.id?as?reid,
iteminfoex.href?as?href,
queryplan.sourceid,
queryplan.sourcetype
FROM?queryplan
JOIN?iteminfoex?ON?queryplan.urlid=iteminfoex.id
WHERE?queryplan.urlid?IS?NOT?NULL
</source>
</view>
<view?name="qrplanerrors">
<source>
SELECT
queryplan.queryid,
queryplan.id?as?rownum,
iteminfoex.id?as?reid,
$rteError$?as?rowtype,
resultcache.value
FROM?queryplan
JOIN?iteminfoex?ON?queryplan.urlid=iteminfoex.id
JOIN?resultcache?ON?queryplan.rsid=resultcache.rsid
WHERE?queryplan.urlid?IS?NOT?NULL?AND?resultcache.rowtype=
$rtfError$
</source>
</view>
<view?name="qrplandelayedresults">
<source>
SELECT
queryplan.queryid,
queryplan.id?as?rownum,
iteminfoex.id?as?reid,
$rteDelayed$?as?rowtype,
resultcache.value
FROM?queryplan
JOIN?iteminfoex?ON?queryplan.urlid=iteminfoex.id
JOIN?resultcache?ON?queryplan.rsid=resultcache.rsid
WHERE?queryplan.urlid?IS?NOT?NULL?AND?resultcache.rowtype=
$rtfDelayed$
</source>
</view>
<procedure?name="sp_NewQueryId"public="true">
<param?name="queryid"type="int"output="true"/>
<source>
--Create?a?empty?query?plan?node?to?generate?a?unique?result
INSERT?INTO?query(dummy)VALUES(0)
SET?@queryid=SCOPE_IDENTITY()
</source>
</procedure>
<procedure?name="sp_InsertQueryPlanEntry"public="true">
<param?name="queryid"type="int"/>
<param?name="sourcetype"type="int"/>
<param?name="url"type="nvarchar(4000)"/>
<param?name="args"type="nvarchar(256)"/>
<param?name="topn"type="int"/>
<source>
DECLARE?@sourceid?int
DECLARE?@urlid?int
SET?@urlid=NULL
IF?@url?IS?NOT?NULL
BEGIN
DECLARE?@finalUrl?nvarchar(4000)
SET?@finalUrl=ISNULL(dbo.PrlFromItemUrl(@url),@url);
EXEC?dbo.sp_RegisterItem@url=@finalUrl,@id=@urlid?output
END
SELECT@sourceid=ISNULL(1+MAX(sourceid),0)FROM?queryplan
WHERE?queryid=@queryid
INSERT?INTO?queryplan(queryid,rsid,sourceid,sourcetype,urlid,
args,topn,rorder,usn)
VALUES(@queryid,0,@sourceid,@sourcetype,
@urlid,@args,@topn,
dbo.RorderFromSourceType(@sourcetype),0)
</source>
</procedure>
<procedure?name="sp_InsertSearchResults"source="InsertSearchResult.sql">
<param?name="urlid"type="int"/>
<param?name="userid"type="bigint"/>
<param?name="searchstring"type="nvarchar(256)"/>
<param?name="topn"type="int"/>
<param?name="rsid"type="bigint"output="true"/>
</procedure>
<procedurename="sp_InsertRelatedResults"
source="InsertRelatedResult.sql">
<param?name="queryid"type="int"/>
<param?name="userid"type="bigint"/>
<param?name="rsid"type="bigint"output="true"/>
</procedure>
<procedure?name="sp_InsertBacklinkResults"
source="InsertBacklinkResult.sql">
<param?name="queryid"type="int"/>
<param?name="userid"type="bigint"/>
<param?name="rsid"type="bigint"output="true"/>
</procedure>
<procedure?name="sp_InsertQueryPlanResults"
source="InsertQueryPlanResult.sql">
<param?name="queryid"type="int"/>
<param?name="rsid"type="bigint"output="true"/>
</procedure>
<procedure?name="sp_PatchCollectionResults">
<param?name="rsid"type="bigint"/>
<source>
INSERT?INTO?resultcache(rownum,rsid,reid,rowtype,value)
SELECT?entries.rownum,@rsid,entries.reid,
CollectionEntryRows.rowtype,CollectionEntryRows.value
FROM(SELECT?DISTINCT?rownum,reid?FROM?resultcache
WHERE?rsid=@rsid?AND?reid>0)AS?entries
JOIN?CollectionEntryRows?ON?entries.reid=
CollectionEntryRows.urlid
</source>
</procedure>
<procedure?name="sp_PatchFragmentResults">
<param?name="rsid"type="bigint"/>
<source>
INSERT?INTO?resultcache(rownum,rsid,reid,rowtype,value)
SELECT?entries.rownum,@rsid,entries.reid,
FragmentEntryRows.rowtype,FragmentEntryRows.value
FROM(SELECT?DISTINCT?rownum,reid,
LatestRsidForUrlId.rsid?AS?masterrsid?FROM
resultcache?JOIN
masteritemlookup?ON?resultcache.reid=
masteritemlookup.fragmenturlid?JOIN
LatestRsidForUrlId?ON
masteritemlookup.masterurlid=LatestRsidForUrlId.urlid
WHERE?resultcache.rsid=@rsid?AND?resultcache.reid
>0)AS?entries
JOIN?FragmentEntryRows?ON?entries.mastorrsid=
FragmentEntryRows.masterrsid?AND
entries.reid=
FragmentEntryRows.url?id
</source>
</procedure>
<procedure?name="sp_PatchErrorResults">
<param?name="rsid"type="bigint"/>
<source>
INSERT?INTO?resultcache(rownum,rsid,reid,rowtype,value)
SELECT?entries.rownum,@rsid,entries.reid,
FragmentEntryRows.rowtype,FragmentEntryRows.value
FROM(SELECT?DISTINCT?rownum,reid,collectioninfo.rsid?AS
masterrsid?FROM
resultcache?JOIN
masteritemlookup?ON?resultcache.reid=
masteritemlookup.fragmenturlid?JOIN
collectioninfo?ON?masteritemlookup.masterurlid
=collectioninfo.id
WHERE?resultcache.rsid=@rsid?AND?resultcache.reid
>0)AS?entries
JOIN?FragmentEntryRows?ON?entries.masterrsid=
FragmentEntryRows.masterrsid?AND
entries.reid=
FragmentEntryRows.urlid
</source>
</procedure>
<procedure?name="sp_FinalizeQuery"public="true"
source="FinalizeQuery.sql">
<param?name="queryid"type="int"/>
</procedure>
<procedure?name="sp_PrepareResult"source="PrepareResult.sql">
<param?name="queryid"type-"int"/>
</procedure>
<procedure?name="sp_GetUrlResults"source="GetUrlResult.sql">
<param?name="urlid"type="int"/>
<param?name="usn"type="bigint"output="true"/>
<param?name="rsid"type="bigint"output="true"/>
</procedure>
<procedure?name="sp_GetQueryResult"source="GetQueryResult.sql">
<param?name="queryid"type="int"/>
</procedure>
<procedure?name="sp_GetQueryResultKnownOnly"
source="GetQueryResultKnownOnly.sql">
<param?name="queryid"type="int"/>
</procedure>
<procedure?name="sp_ReadCachedRows"public="true">
<param?name="queryid"type="int"/>
<param?name="urlid"type="int"/>
<source>
IF?@queryid=0
BEGIN
SELECT?@queryid=MAX(queryid)FROM?queryplan
END
EXEC?sp_UpdateQueryUrlId?@queryid
SELECT?rowtype,value?FRON?qrfinal
WHERE?queryid=@queryid?AND?reid=@urlid
</source>
</procedure>
</database>
</dbsetup>
dbinit,dsi
<?xml?version="1.0"encoding="utf-8"?>
<dbsetup?xmlns="http://tempuri.org/dbinit.xsd">
<login?name="@\Domain?Users"></login>
<link?name="XSPDB"description="Trimergent?Search?Page?Provider"
provider="XSPDB"/>
<include?resource="extprocs.dsi"/>
<database?name="xa"filename="c:\A6753C08E94747a1B3587D12ECF1E3EE\xadata.mdf"
xmlns="http://tempuri.org/dbinit.xsd"
arithabort="on"ansi_padding="off">
<login?name="@\Domain?Users"></login>
<role?name="xausers"></role>
<include?resource="utility.dsi"/>
<include?resource="url.dsi"/>
<include?resource="container.dsi"/>
<include?resource="item.dsi"/>
<include?resource="collection.dsi"/>
<include?resource="results.dsi"/>
<include?resource="groupings.dsi"/>
<include?resource="providers.dsi"/>
<include?resource="query.dsi"/>
<include?resource="security.dsi"/>
<include?resource="outbox.dsi"/>
<include?resource="errors.dsi"/>
<include?resource="timing.dsi"/>
<include?resource="references.dsi"/>
<include?resource="replication.dsi"/>
<procedure?name="sp_InitStore"public="true">
<source>
DECLARE@id?int
EXEC?sp_RegisterContainer?@url=′mail://′,@fstamphint=-1,@id=
@id?output
EXEC?sp_RegisterContainer?@url=′file:///c:/′,@fstamphint=-1,
@id=@id?output
EXEC?sp_RegisterServer?@href=′http://centaur/share′,@type=1
</source>
</procedure>
<execute?name="sp_InitStore"/>
</database>
</dbsetup>
1. can call bag (CW)..NET have one and be called the notion that to call bag.The fundamental purpose of this layer is to make the .NET code can call non-management territory and other relevant modes.Make up a system in Trimergent, it expands to the standard support that can call bag and does more complex interface.Unlike can only embeddedly compiling realization to what classical com interface was mapped to the .NET method simply one to one, our layer can use at the existing .NET/COM interface of suitable part the implementor, rather than defines whole new interface.In the position that has defined new interface, defined method so that and their environmental facies compatibilities of being used for.Managed interface is .NET close friend, and not managed interface is COM close friend.
Realization comprises a plurality of base class, and they realize IUnknown, to the base object of all managed interfaces, to managed/not self-defined realization of gathering, the specific COM that is discussed or the .NET interface of managed end.Related several examples and actual interface are arranged here.The link of some basic unit's codes and interface
IUnknown.cpp-all base class of managed interface not
The base class of INetObject.cpp-all managed interfaces
NetMarshal.cpp-be used to manages the help class of whole establishments of short-term and agency
A. existing com interface is to the example of existing .NET interface mappings
IStream-stream
IStream: http://msdn.microsoft.com/library/defaut.asp?url=/library/en- us/stg/stg/istream.asp
Stream: http://msdn.microsoft.com/library/default.asp?url=/library/en- us/cpref/html/frlrfsystemiostreamclasstopic.asp
IEnumVariant-IEnumerable
IEnumVariant- http://msdn.microsoft.com/library/default.asp?url=/library/en- us/automat/htm/chap56t2d.asp
IEnumerable- http://msdn.microsoft.com/library/default.asp?url=/library/en- us/cpref/html/frlrfsystemcollectionsienumerableclasstopic.asp
B. existing com interface is to the example of new .NET interface mappings
IOleCommandTarget-INetCommandTarget+INetCommand
IOleCommandTarget-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/html/5c8b455e- 7740-4f71-aef6-27390a11a1a3.asp
INetCommandTarget-attached?file?INetCommandTarget.cs
INetCommandTarget-attached?file?INetCommand.cs
Below list the function that it enabled:
A) the index server filtrator (Index Server Filters) among the structure .NET
B) IE that makes up among the .NET expands, and comprises tool bar
C) Shell that makes up among the .NET expands
D) context menu (Context Menus) among the structure .NET
E) the expansion MAPI (Extended MAPI) among the visit .NET
F) the NT daily record API (NT Journal API) among the visit .NET
G) visit of the html object model among the .NET
H) shine upon to the general IDispatch incident of .NET incident
2. the relevant COM technology of database.Having write a COM API makes people can realize institute's storing process of expanding.Also having write a simple COM API uses IEnumXXX only to transmit OLEdb row set.Existing ATL foundation structure only supports to be carried in fully on the data structure row set in the internal memory.Our realization can be returned people and be configured the result who embarks on journey when request.
3. the asynchronous operation when playing the part of.Institute's Annex III " class file "-OperationBase.cs, ContextSwitchOperation.cs and AbstractQueryExecute.cs.Also created a .NET foundation structure, the asynchronous operation that allows the user to play the part of.Server operation local system visit (environment that it loaded).When server received a request, it used the access token of caller to play the part of the caller.This can hold us at local system and in caller can both operation code.Foundation structure of the present invention comprises an operation base class (OperationBase), and it makes operation exception or synchronously is written into, allows nested operation and have embedded ability comes propagated error and progress msg.Derive class (ContextSwitchOperation) and provide foundation structure so that code operates under the environment of local system and/or caller.Derive class and cover two methods (OnExecuteAsCaller, OnExecuteAsSystem) by writing, can control the every environment that code is performed.An example is provided in the AbstractQueryExecute class.
4. view.Created a kind of model that is used for defining the XML view.This model can define the assembly that the element-specific in the source data is operated.A view compilation device is arranged then, and it is compiled as this model for the specific form of various export techniques, for example XSLT and ASP.Crucial change is that our view definition and their included assemblies is independent of any specific browser technology.
Appended two files, defaultview.xsp (exemplary view) and emals.xsl (exemplary components).All begin the specific institute of our view definition is underlined by " xview ".Notice and in these files, can see HTML and XSLT mark.This is because shown particular figure and assembly based on XSLT, and convert source data to HTML.Yet the use of these technology is not that architecture is necessary.The description of specific markers:
Xview:html represents that all output formats that comprise mark are the mark of html.
Xview:component represents the component that should comprise that " type type " attribute is quoted.Write component so that
Coupling has the source data (being Dashboard XML form) of known mode
Element-specific, and establishment is for the specific output of pattern of coupling element.
For example, " title " indicia matched in " title " component and the source data, and
The inside literal that gets major elements comprises the literal of title.
Xview:results represents a series of results that will comprise.Export a form to comprise group as a result.
Xview:group represents one group of result." class class " attribute has specified group to gather at the long and
In situation (for example this as a result group appear at which row in).
Xview:viewitem comprises the mark of one group of other xview order.There is not function at present, but can quilt
As the mark that XML name space prefix etc. is set.
Xview:xslcomponent XSL special use.Create XSLT output, this XSLT output has been specified and has been used for
Determine that this component will be applied to the standard of which node.
Xview:componentrow has specified a series of components subsequently, and they will be incorporated in the row.With
In the icon of an item and caption text row are combined.
Xview:componentbody represents an item " main body body " part, generally comprises the description of an item
The property literal.
5.XML upgrade figure (XML Updategram).Defined the user's visible file form that is used to describe to the variation of any XML document.More format is identical with unprocessed form, does not influence the more note of neology substantially.An algorithm is arranged, and it uses original document, renewal document and pattern information to use renewal figure and to produce new document.This renewal technology has special support to handling renewal renewal figure self.This technology is applied to the many different situations in the product.
A. edit instrument panel, view
B. use and upgrade graph grammar drawing template establishment document
C. because the compact nature of renewal figure allows the Ajax style documents editing on the http.
D, support better multi-user's semanteme by reducing conflict
For the RSS mode producing is upgraded figure.
Following example is the item that inserts a headed link and delete this link value
<?xml?version="1.0"encoding="UTF-8"?>
<rss?xmlns:xaug=" http://www.trimergent.com/xaug">
<channel>
<item?xaug:position="after:link=http://www.changellnkl.com">
<link>http://www.weblinkl.com</link>
<title>Web?Llnk?One</title>
</item>
<item?xaug:op="delete">
<link>http://www.deletellnk.com</link>
</item>
<item?xaug:op="change">
<link>http://www.changelinkl.com</link>
<title>Web?Link?One</tltle>
</ltem>
</channel>
</rss>
Xml renewal figure has expanded original xml with grammer renewal figure attribute, upgrades the figure attribute and does not conflict with the original document attribute in name space.Renewal figure attribute has:
Xaug:op=represents it can is the renewal operation of " new ", " delete ", " change "
Xaug:position=makes renewal be reoriented to diverse location in the same document to actual xml
Xaug:select=makes complicated xql grammer can select specific xml code to upgrade.
Renewal figure engine also uses schema definition document to determine to search semanteme.For example in above pattern, the chain field of a node is labeled as primary key.Therefore the item node has an implicit automatically selection based on chain field.Therefore, before node was inserted document, renewal figure engine can use the chain field of new data that it is relevant with destination document.If the node of identical chain field is arranged in document, then renewal can replace this part of document otherwise insert one new.
6.XHTML upgrade figure (XHTML Updategrams).It is the particular form that above-mentioned XML upgrades graph grammar, acts on the XHTML file layout.One code is realized the movable HTML that this renewal figure is applied in the browser is set.Use the IMarkupServices in the browser to support the variation of tree being made necessity.In addition, make up renewal figure perception XSLT so that the XML renewal figure that can change compatibility mode is to produce XHTML renewal figure.
Below be the example HTML that includes the form of two row
<html>
<head>
<title>Original?Title</title>
</head>
<body>
<table?border="1"width="100%"id="tableld">
<trid="row1">
<td>Row1</td>
</tr>
<tr?id="row2">
<td>Row2</td>
</tr>
</table>
</body>
</html>
Renewal to be to change page title, deletion delegation, change delegation and to add newline, looks picture:
<?xml?version="1.0"encoding="UTF-8"?>
<html?xmlns:xaug=" http://www.trimergent.com/xaug">
<head>
<title>Updated?Title</title>
</head>
<body>
<table?border="1"width="100%"id="tableld">
<trid="row1"xaug:op="delete">
</tr>
<tr?id="row2">
<td>Row2?Changed</td>
</tr>
<tr?id="row3">
<td>Row3?Added</td>
</tr>
</table>
</body>
</html>
The IMarkupServices interface index
http://msdn.microsoft.com/library/defaultasp?url=/workshop/browser/mshtml/reference/i faces/markupservices/markupservices.asp
7.PRL/Href/ld conversion.There is a system to be used for apace and for good and all " this locality " title (for the specific title in specific names space) converted to adopted name.Some features comprise: 1) act on any amount of local name space, 2) allow general ID to create any other machine that appears on any machine and act on use system of the present invention.
In system of the present invention, " PRL " (the device URLs is provided) is a URL, quote and one specificly provide device (i.e. " file: "), point on the particular machine specific resources (, file " c: foo bar.txt ") of (PRL that points to " c: foo bar.txt " only on the particular machine that it is used for time be only effectively).
The example of prl:
(file on the hard disk drive)
file:///c:/documents%20and%20settings/matt/my%20documents/my%20dashboards/audrey-xsp
(mail item that the MSN WDS is returned)
mail://localhost/default/mailbox%20%20matt%20hillman%20($e0b7)/lnbox/0000000011fe3d247f2121439a9fbceb4942aa6e07007ed607858b903f4497a241f08c52c25700000000209d0000269956fd74c22343ada8b6079c25f43e00000016bd1f0000
When these clauses and subclauses are anchored to instrument panel, may be shared then, then need PRL is converted to one general " HREF ", it is the URL that can share a plurality of machines, and points to source data uniquely.
This finishes by following steps: the prefix of a) using the source machine of identification data, b) the last descriptive part (ordinary representation filename and expansion) of the additional PRL unique identifier (making any container level become two dimension) of the container of these clauses and subclauses of establishment expression, and c).
On every machine (comprising central server), the mapping of database storing from a plurality of PRL to a plurality of HREF.PRL/HREF is to being " registration ", and in case registration then can use an integer ID to represent that PRL/HREF is right.Integer ID is used in the database manipulation, is used for adding effectively when carrying out inquiry the right information about being registered.
The example of href has (href that these are above prl):
http://localhost/share/content.xaquery/matt01/eac518ec2ad609fb/audrey.xsp
http://localhost/share/content.xaquery/matt01/8de2c5fd53eb4281/0000000011fe3d247f2121439a9fbceb4 942aa6e07007ed607858b903f4497a241f08c52c25700000000209d0000269956fd74c22343ada8b6079c2 5f43e00000016bd1f0000
" http://localhost/share/content.xaquery/MachineName " part of HREF is come decipher by software.If " MachineName " is equivalent to local machine name, then can use the PRL-HREF mapping table of home server that href is converted to prl.Otherwise software is then transmitted the HTTP request to central server, comprises the xcopy from all users.On server, the PRL-HREF mapping table with server converts HREF to PRL then.
Notice that HREF no longer is provided by a specific device that provides.In fact, of can be mapped as on the client machine of HREF provides device, but it is a diverse device that provides on the server machine.For example, when an email message was copied to server, it was stored as the .MSG file in the file system (relative with mail folder).On client computer, the PRL of these clauses and subclauses is " mail:... " PRL.On server, PRL is " file:... " PRL.Yet HREF is consistent on originating client device, server and every other client machine, and is the key that the data clauses and subclauses that are present on the particular customer machine can be shared with other machines.
8. be regarded as the ACL of database.Various ACL containers (document, another name, token) are considered as the ACL form.For example, Windows user's access token comprises the security information of this user during a given login sessions.Token identifies the group under this user and this user, and system controls visit to Security Object with these information.A token is broken down into following database table:
TokenCache (token high-speed cache)
Userid (user ID) Groupid (group id) The position
The user's that token is represented identifier." id " in these row and " UserInfo " table shows the foreign key relation. The identifier of the group (another name) under the user." id " in these row and " UserInfo " table shows the foreign key relation. " groupid " position in User Token.
UserInfo (user profile)
Id Sid Title Email
(unique) identifier of the automatic generation of user, group or computer account. Identify the NT SID (secure identifier) of window account uniquely. The title of window account. The email of window account.
Also has similarly " decomposition " database table for other ACL informations as the NT security descriptor.This makes various ACL renewal/merger activitys occur in the process that conduct is stored in the database fully, and the process of being stored can be improved performance and can realize complex characteristic.
9. database setting.Developed a kind of database definition language, and read this XML and generate or the processor of new database more based on XML.Many features are built in this (also can have more).Feature comprises the constant of defining named, when being provided with the defining named of (still be unrealized but design) assessment expression, foreign key concerns, index and constraint and the definition of core row are mutually integrated form definition and based on the ability of XML table initialization data.
Appended two illustrative data base description document.These examples do not comprise whole features, and key concept just is described.In this embodiment, dbinit.dsi is " master " DDF, and this document comprises various alternative documents, comprises the group of relevant form, process etc.
Mark is described:
● the root mark of dbsetup-DDF.
● database-definition one database.Many other elements are usually as the sub-mark of database.
● another DDF of include-recursively comprise.Can be used for relevant form/function/process/sets of views is lumped together.
● login-defined SQL login.
● link-defined the database of SQL link
● role-defined SQL task.
● local-defined local (only effective) constant to this document.This can be used for representing constant value with the title in the source marking (as follows), makes code easy to understand and modification.
● global-be similar to local constant, but this constant can use in All Files.
● table-definition one form.The sub-mark of form comprises:
● column-defined tabular.Row can handlebar they be described as the attribute of main key word, identity row, all row or the like.
● index-the defined multiple row index of this table.
● procedure-a defined process of being stored.The sub-mark of process comprises:
● param-the defined parameter of institute's storing process.
● source-the defined source code of process.Perhaps, the process mark can comprise the attribute " source " of quoting the source file of opening in a minute.
● function-be similar to process has defined user-defined function.
● param-the defined parameter of institute's storing process
● returns-the defined rreturn value of institute's storing process.
● source-the defined source code of function.
● view-defined SQL view.
● source-the defined source statement of view.
Database set handling device reads description document and mark is converted to true sql command.Processor can be with several different mode operations:
● create-create database based on describing.
● there has been database in update-supposition, upgrades form/process etc., uses any variation that description document is done.
● delete-deletion one existing database.
10. .Net is inserted sql server.Insert in the microsoft sql server database for the data of effectively the .NET parts being returned, developed a kind of framework, it can be shown as OLEDB to any stream of the structural data that is returned by managed code device row set is provided.Framework is subjected to metadata driven, and uses Win32 IPC function (such as named pipe and other).The common OLEDB that its is realized and microsoft sql server moves in same process provides device, is the request fluidisation to the data imported with the T-SQL language .NET code effectively and the data stream of being returned is shown as OLEDB row set.This framework provides sane realization for all required OLEDB interfaces of returning metadata and the results set dynamically found from the result that the .NET parts reflux.Because having used fluidisation pattern, this framework is that performance and internal memory are effective, and can begin consumption data when the .NET code still bears results.
Below be how to use framework that " XspRow " object is turned to the OLEDB code and they is shown as the example of the OLEDB row set that has " XspRow " metadata information from the C## code flow.As long as from " XspRow " of .NET code but data become the time spent call microsoft sql server TSQL inquiry, consume row set, thereby can insert the XspRow object in the database effectively.The C++ document demonstration OLEDB end of realizing, the C# document demonstration .NET end of realizing.
These two ends all use Win32 Named Pipe (Win32 named pipes) serialization is flowed in the request of XspRows and the row that is produced.The programmable interface of named pipes is shown as IStream* interface in the C++ code and Stream (stream) object in the C# code.Realization with the .NET code.
11. search for integrated scroll bar (click on the scroll bar is shown).View of today has two kinds of search to support: a) along with user's typing character sequence, view is rolled into the position that the value of institute's sort field and the literal of so far keying in are complementary.Example is arranged according to the from field in the inbox, and keys in the name that rolls.B) user keys in some search text, and view filters every so that the content that is complementary with search criterion only is shown.Search scroll bar feature is not filtered or is required row are sorted.Search is finished on the scope of viewed item.The result of occurrence is by there being the expression that brings of expression institute occurrence on scroll bar.The user can bring by the colour on the click on scroll bar and easily be rolled into the item of being paid close attention to.The interesting application of this feature is a historical view.People remember the something that they take place often near the moment of doing a certain specific activities or search.By using this scroll bar characteristic, user's this point in the history that can roll is to determine that url that they are searched is whether in tabulation.
The storing process framework API of institute of expansion:
//-----------------------------------------------------------------------
--------------------
//Xproc.h
All rights reserved (c) 2004-2005 of //Trimergent company
//-----------------------------------------------------------------------
--------------------
#include"srv.h"
#pragma?once
[
emitidl(false)
];
[
object,
local,
uuid("2FCA12CA-9AF2-41BF-83C4-DB8E4744591F"),
helpstring("IXProcRow"),
pointer_default(unique)
]
__interface?IXProcRow:IUnknown
{
HRESULT?SetColumn(const?char*szName,const?VARIANT*pvarSet);
HRESULT?Commit();
};
[
object,
local,
uuid("7354CBD0-D0C8-4060-ADE4-219EB8CEB821"),
helpstring("IXProcCallback"),
pointer_default(unique)
]
__interface?IXProcCallback:IUnknown
{
HRESULT?GetParameterCount(int*pcparams);
HRESULT?GetParameter(const?char*szName,int?iParamDefault,VARIANT*
pvarGet);
HRESULT?SetParameter(const?char*szName,const?VARIANT*pvarSet);
HRESULT?CreateRow(IXProcRow**pprow);
HRESULT?ClearRowCount();
};
typedef?HRESULT(*FNXPROC)(IXProcCallback*);
[
emitidl(true)
];
SRVRETCODE?ExecExtendedProcedure(SRV?PROC*pSrvProc,FNXPROC?pfnProc);
HRESULT GetStringParameter(IXProcCallback*pxpc,const?char*szName,int
iParamDefault,
BSTR*pbstrValue,BOOL?fNullOK=
false);
HRESULT GetLongLongParameter(IXProcCallback*pxpc,const?char*szName,int
iParamDefault,
LONGLONG*pll);
#define?DECLARE_XPROC(name)\
extern"C"__declspec(dllexport)SRVRETCODE?xp?##name(SRV_PROC*pSrvProc)\
{\
return?ExecExtendedProcedure(pSrvProc,name);\
}\
Only transmit OLEDB row set:
//-----------------------------------------------------------------------
--------------------
//structDB.h
All rights reserved (c) 2004-2005 of //Trimergent company
//-----------------------------------------------------------------------
--------------------
#pragmaonce
[
emitidl(false)
];
enum?SQLCOMMANDTYPE
{
SQLCOMMAND_NONE=0,
SQLCOMMAND_SELECT=1
};
struct?SqlParseResult
{
SQLCOMMANDTYPE?sqlCommand;
WCHAR* wszCommand;
WCHAR* wszNames;
int cchNames;
WCHAR* wszSource;
WCHAR* wszContains;
WCHAR* wszType;
WCHAR* wszOrderBy;
int* rgNameOffset;
int cColumns;
int cRowsRequested;
};
struct?StructDefinition
{
DBTYPE wType;
int offset;
WCHAR*?wszName;
};
#define?BEGIN_STRUCTDEF(s)\
static?const?StructDefinitionstructdef_##s[]=\
{\
#define?STRUCTDEF_ENTRY(s,t,m)\
{\
t,\
offsetof(s,m),\
L#m\
},
#define?END_STRUCTDEF(s)\
{DBTYPE_EMPTY,sizeof(s),0},\
};
[
object,
local,
uuid("8E95A49C-1E17-4022-8116-930388DA8035"),
helpstring("IStructDefinition?Interface")
]
__interface?IStructDefinition:IUnknown
{
HRESULT?GetStructSize(ULONG*psize);
HRESULT?GetColumnCount(ULONG*pccol);
HRESULT?FindColumn(const?WCHAR*szName,DBORDINAL*picol);
HRESULT?GetColumnDescription(DBORDINAL?icol,WCHAR*pszDesc,ULONG*pcb);
HRESULT?GetColumnInformation(DBORDINAL?icol,DBCOLUMNINFO*pcolinfo);
HRESULT?BindColumn(DBORDINAL?icol,DBBINDING*pbind,void*pvData,const
void*pvSrc);
HRESULT?Copy(void*pvData,const?void*pvSrc);
HRESULT?Clear(void*pvData);
};
[
object,
local,
uuid("EA651891-9E9E-4840-A286-7CC4B6A7C7A4"),
helpstring("IEnumStructInterface")
]
__interface?IEnumStruct:IUnknown
{
HRESULT?Clone(IEnumStruct**ppenum);
HRESULT?Next(ULONG?cpv,void*rgpv,ULONG*pcpvFetched);
HRESULT?Reset();
HRESULT?Skip(ULONG?cpv);
HRESULT?GetDefinition(IStructDefinition**ppsdef);
};
[
object,
local,
uuid("4550EC2C-408E-41FE-A5DF-9F199EDE09BF"),
helpstring("IStructDBSecurityContext?Interface")
]
__interface?IStructDBSecurityContext:IUnknown
HRESULT?GetToken(HANDLE*phToken);
HRESULT?CanImpersonate(BOOL*canImpersonate);
HRESULT?Impersonate();
HRESULT?RevertToSelf();
};
[
object,
local,
uuid("065D083E-D79D-4FFB-A6C8-23A4D6AF680B"),
helpstring("IStructDbCommand?Interface")
]
__interface?IStructDBCommand:IUnknown
{
HRESULT?GetDefinition(IStruotDefinition**ppsdef);
HRESULT?GetEnumerator(IStructDBSecurityContext*psc,const?SqlParseResult*
pspr,IEnumStruct**ppenum);
};
HRESULT?CreateSDBDataSource(const?CLSID*pclsid,IClassFactory*pfactSDBCmd,
IUnknown*punkOuter,REFIID?riid,IUnknown**
ppunk);
HRESULT?CreateStructDef(const?StructDefinition*psd,IStructDefinition**
ppsdef);
[
emitidl(true)
];
XspDbEnumOnStream.cpp
//-----------------------------------------------------------------------
--------------------
//XspDbEnumOnStream.cpp
All rights reserved (c) 2004-2005 of //Trimergent company
//-----------------------------------------------------------------------
--------------------
#include"stdafx.h"
#include"xspdb.h"
struct?XspRowFromManaged
{
DWORD ValOffset;
INT UrlId;
INT RowType;
UINT RowNumber;
};
class?XspDbEnumOnStream:public?CComObjectRootEx<CComMultiThreadModel>,
public?IEnumStruct
{
public:
static?HRESULT?Create(IStructDefinition*s,IStream*inputStream,
IEnumStruct**ppenum)
{
CComObject<XspDbEnumOnStream>*penum=NULL;
HRESULT?hr=S_OK;
ChkBool(ppenum,E_INVALIDARG);
*ppenum=0;
Chk(CComObject<XspDbEnumOnStream>::CreateInstance(&penum));
penun->m_structDefInt=s;
penum->m_pstream=inputStream;
Chk(penum->Init());
Chk(penum->QueryInterface(ppenum));
penum=NULL;
Error:
if(penum!=NULL)
{
delete?penum;
}
return?hr;
}
HRESULT?Clone(IEnumStruct**ppenum)
{
return?E_NOTIMPL;
}
HRESULT?Next(ULONG?cpv,void*pv,ULONG*pcpvFetched)
{
HRESULT?hr=S_OK;
ChkBool(cpv==1,E_INVALIDARG);
ChkBool(pcpvFetched==NULL,E_INVALIDARG);
XspRow*row=(XspRow*)pv;
// read capable size
DWORD?totalRowSize;
Chk(ReadNumberOfBytes((BYTE*)(&totalRowSize),sizeof(totalRowSize)));
ChkBool(totalRowSize>0,E_UNEXPECTED);
// read original line data
BYTE*rawData=new?BYTE[totalRowSize];
Chk(ReadNumberOfBytes(rawData,totalRowSize));
XspRowFromManaged*rowFromStream=
reinterpret_cast<XspRowFromManaged*>(rawData);
Whether // check it be the designator of last column
if(rowFromStream->RowNumber==0xFFFFFFFF)
{
// be that it is last column.Its value character string comprises succeeded by the HRESULT of the operation of optional error character string.
hr=S_FALSE;
}else
{
// report an error-it should be rewritten so that more effective, and the information of not duplicating relevant get URL and Val.
row->value=ReadStringFromRowData(rawData,rowFromStream-
>ValOffset,hr);
Chk(hr);
row->rownum=rowFromStream->RowNumber;
row->rowtype=rowFromStream->RowType;
}
delete[]rawData;
Error:
if(hr==S_FALSE)
{
// deletion flow object.
m_pstream.Release();
}
return?hr;
}
HRESULT?Reset()
{
return?E_NOTIMPL;
}
HRESULT?Skip(ULONG?cpv)
{
return?E_NOTIMPL;
}
HRESULT?GetDefinition(IStructDefinition**ppsdef)
{
HRESULT?hr=S_OK;
Chk(m_structDefInt.CopyTo(ppsdef));
Error:
return?hr;
}
BEGIN_COM_MAP(XspDbEnumOnStream)
COM_INTERFACE_ENTRY(IEnumStruct)
END_COM_MAP()
private:
CComPtr<IStream>m_pstream;
CComPtr<IStructDefinition>m_structDefInt;
//CComHeapPtr<StructDefinition>m_structDef;
HRESULT?ReadNumberOfBytes(BYTE*buffer,DWORD?numberOfBytes)
{
HRESULT?hr=S_OK;
ULONG?readBytes;
ULONG?totalReadBytes=0;
while(totalReadBytes!=numberOfBytes)
{
Chk(m_pstream->Read(buffer+totalReadBytes,numberOfBytes-
totalReadBytes,&readBytes));
totalReadBytes+=readBytes;
}
ChkBool(totalReadBytes==numberOfBytes,E_UNEXPECTED);
Error:
return?hr;
}
WCHAR*ReadStringFromRowData(BYTE*rowStart,DWORD?offset,HRESULT&hr)
{
if(offset>0)
{
BYTE*curPointer;
curPointer=rowStart+offset-sizeof(DWORD);
DWORD?curStringLen=*(reinterpret_cast<DWORD*>(curPointer));
curPointer+=sizeof(DWORD);
WCHAR*curStringStart=reinterpret_cast<WCHAR*>(curPointer);
WCHAR*res;
if(FAILED(hr=CoDuplicateStringLength(curSt?ringStart,
curStringLen,&res)))
{
return?NULL;
}
return?res;
}else
{
return?NULL;
}
}
// make us be ready to read row
HRESULT?Init()
{
HRESULT?hr=S_OK;
// read version
DWORD?ver;
Chk(ReadNumberOfBytes((BYTE*)(&ver),sizeof(ver)));
ChkBool(ver==1,E_UNEXPECTED);
// read field number
WORD?numOfFields;
Chk(ReadNumberOfBytes((BYTE*)(&numOfFields),sizeof(numOfFields)));
ChkBool(numOfFields>0,E_UNEXPECTED);
// read metadata.Attention: it does not use as yet, but can use when making this code more general in the future;
DBTYPE?curType;
for(int?i=0;i<numOfFields;i++)
{
Chk(ReadNumberOfBytes((BYTE*)(&curType),sizeof(curType)));
}
// be ready to begin to read row
Error:
return?hr;
}
};
HRESULT?CreateXspEnumOnStream(IStructDefinition*s,IStream*stream,
IEnumStruct**ppenum)
{
return?XspDbEnumOnStream::Create(s,stream,ppenum);
}
XspRowBinarySerializaer.cs
//-----------------------------------------------------------------------
--------------------
//XspRowBinarySerializer.cs
All rights reserved (c) 2004-2005 of //Trimergent company
// describe:
The binary serialization of //IEnumXspRowInfo is realized.Binary format and OleDb provide device from the C## code // stream read
Return the used format compatible of data.
//-----------------------------------------------------------------------
--------------------
using?System;
using?System.IO;
using?System.Text;
using?System.Data.OleDb;
using?xa.api;
using?xa.core;
namespace?xa.xsp
{
///<summary>
The binary serialization of ///IEnumXspRowInfo is realized.
///all character strings all are Unicode.
///data layout is as follows:
///1) version information of form-DWORD[4 byte].It is a number.
///2) Hang metadata.Its use DBTYPEENUM/OleDbType constant [for C++/.NET/ //OleDB props up
It is identical holding] represent the row type.Each clauses and subclauses is WORD[2 bytes].
///3) Hang tabulation.Every row has following column format:
///a) is the capable size-DWORD of unit with the byte.Attention: it does not comprise 4 bytes of capable dimension information.
The data [identical] of the row of ///b) with the order described in the metadata.
///b.i) write being worth itself for the capable member with regular length (being non-character string so far)
///b.ii) write DWORD for the member with variable-length, and this DWORD points to skew.
The line data (is unit with the byte) that ///from character string begins begin the place, should note just before this position
DWORD comprises string length [BSTR method].The position of data beginning itself is pointed in skew, but not the stored position of string length.
Off-set value 0 is meant null character string.
///c) then writes their size before variable-sized character string when having write all above-mentioned information.
///</summary>
public?class?XspRowBinarySerializer
{
#region?members?and?constants
private?const?UInt32version=1;
Private const int stringLenSizelnBytes=4; The byte number that the length of // write characters string is required
Private const int stringOffsetSizelnBytes=4; // will use UInt32 to come the write characters string
The skew of data
private?BinaryWriter?writer;
private?bool?metadataSerialized=false;
#endregion
private?XspRowBinarySerializer()
{}
public?XspRowBinarySerializer(Stream?outputStream)
{
this.writer=new?BinaryWriter(outputStream,Encoding.Unicode);
}
///<summary>
///with the given single row of writing a program
///</summary>
///<param?name="curRow"X/param>
///<param?name="writer"x/param>
private?static?void?WriteRow(XspRowInfo?curRow,BinaryWriter?writer)
{
XaTrace.Assert(curRow!=null);
XaTrace.Assert(writer!=null);
// note: following if XspRowlnfo definition.
// each int/uint/enum occupies 4 bytes.
It is [long that // each character string takies stringLenSizelnBytes+stringOffsetSizelnBytes byte
Degree and skew]+byte number comes write characters string character.
//string VaI;
//int UrIId;
//ResultRowType?RowType;
//uint RowNumber;
intfixedRowSizePart=stringOffsetSizelnBytes+4+4+4;
int?curRowSize;
curRowSize=fixedRowSizePart;
if(curRow.Val!=null)
{
curRowSize+=stringLenSizelnBytes+curRow.Val.Length*2;//Unicode
Character occupies 2 bytes
}
// write total capable size.
Write(curRowSize);
int?curStringDataOffset=fixedRowSizePart+stringLenSizelnBytes;
// write the skew that the val string data is write a program.
writer.Write(curRow.Val!=null?curStringDataOffset:0);
// write url id.
writer.Write(curRow.UrIId);
// write result row type.
writer.Write((Int32)curRow.RowType);
// write capable number.
writer.Write(curRow.RowNumber);
// the value of writing string data as required.
if(curRow.Val!=null)
{
writer.Write(curRow.Val.Length);
writer.Write(UnicodeEncoding.Unicode.GetBytes(curRow.Val));
}
}
private?static?void?WriteLastRow(BinaryWriter?writer,Int32?hresult,string
errorMessage)
{
XspRowlnfo?specialRow=new?XspRowlnfo();
specialRow.RowNumber=OxFFFFFFFF;
specialRow.Val=String.Format("{0}{1}",hresult,errorMessage);
WriteRow(specialRow,writer);
writer.Flush();
}
///<summary>
The metadata relevant with type write in ///in single record.
///</summary>
public?void?SerializeMetadata()
{
XaTrace.Assert(this.writer!=null);
// written document format version.
this.writer.Write(version);
OleDbType[]xspRowTypes=new?OleDbType[]
{
OleDbType.WChar, // value
OleDbType.Integer,//url?ID
OleDbType.Integer, // to the RowType of Int32
OleDbType.Unsignedlnt, // capable number
};
// write field number.
this.writer.Write((Ulntl?β)xspRowTypes.Length);
// write the OleDbTypes of XspRowlnfo
Ulntl6?curType;
for(inti=0;i<xspRowTypes.Length;i++)
{
curType=(Ulntlβ)xspRowTypes[i];
this.writer.Write(curType);
}
this.metadataSerialized=true;
}
///<summary>
///all available row are serialized into in the constant current
///</summary>
public?void?Serialize(IEnumXspRowInfo?dataSource)
{
if(dataSource==null)
{
XaTrace.LogExThrow();
throw?new?ArgumentNul?lException("dataSource");
}
if(!this.metadataSerialized)
{
SerializeMetadata();
This.metadataSerialized=false; Thereby // it is resetted can repeatedly call serialization
}
while(dataSource.MoveNext())
{
XspRowlnfo?curRow=dataSource.CurrentRow;
if(curRow!=null)
{
WriteRow(curRow,this.writer);
}
}
// write special last column, represent that it is the ending of stream.
WriteLastRow(this.writer,0,string.Empty);
}
public?void?SerializeRows(XspRowlnfo[]rows,bool?noMoreRows)
{
if(rows!=null)
{
for(int?i=0;i<rows.Length;i++)
{
SerializeRow(rows[i]);
}
}
if(noMoreRows)
{
WriteLastRow(this.writer,0,string.Empty);
}
}
public?void?SerializeRow(XspRowInfo?ri)
{
SerializeRow(ri,false);
}
public?void?SerializeRow(xspRowInfo?ri,bool?lastRow)
{
if(ri!=null)
{
WriteRow(ri,this.writer);
}
if(lastRow)
{
WriteLastRow(this.writer,0,string.Empty);
}
///<summary>
///can be used for, be serialized into mistake in the constant current.
///</summary>
///<param?name="s"x/param>
///<param?name="hresult"></param>
///<param?name="ex"></param>
public?void?WriteError(Int32?hresult,Exception?ex)
{
WriteLastRow(this.writer,hresult,ex!=null?ex.Message:
string.Empty);
}
}
}
NamedPipeStream.cpp
//-----------------------------------------------------------------------
--------------------
//NamedPipeStream.cpp
All rights reserved (c) 2004-2005 of //Trimergent company
//-----------------------------------------------------------------------
--------------------
#include"stdafx.h"
#include"objectsecurity.h"
using?namespace?System::IO;
using?namespace?System::Runtime::Serialization;
using?namespace?System::Security::AccessControl;
namespace?xa
{
namespace?win
{
[FlagsAttribute]
public__value?enum?PipeMode
{
Wait=0,
NoWait=1,
ReadByte=0,
ReadMessage=2,
TypeByte=0,
TypeMessage=4
};
public__gc?class?NamedPipeStream:public?FileStream
{
public:
//NamedPipeStream
// author: raman
//
NamedPipeStream(String*pipename,FileMode?mode,FileAccess?access,int
buffersize,ObjectSecurity*os):
FileStream(OpenCreateHandle(pipename,mode,access,buffersize,os),
access)
{
}
NamedPipeStream(String*pipename,FileMode?mode,FileAccess?access,int
buffersize):
FileStream(OpenCreateHandle(pipename,mode,access,buffersize),
access)
{
}
//NamedPipeStream
// author: raman
//
NamedPipeStream(String*pipename,FileMode?mode,FileAccess?access):
FileStream(OpenCreateHandle(pipename,mode,access,
Pipe_DefaultBuffer),access)
{
}
//get_Name
// author: raman
//
__property?String*get_Name()
{
return?this->pipename;
} //
//get_Path
// author: raman
//
__property?String*get_Path()
{
return?PathFromName(this->pipename);
}
//get_Mode
// author: raman
//
__property?PipeMode?get_Mode()
{
DWORD?state;
ChkLastError(GetNamedPipeHandleState(this->get_HPipe(),&state,0,
0,0,0,0));
return(PipeMode)state;
}
//set_Mode
// author: raman
//
__property?void?set_Mode(PipeMode?value)
{
DWORD?state;
state=(DWORD)value;
ChkLastError(SetNamedPipeHandleState(this->get_HPipe(),&state,0,
0));
}
//PathFromName
// author: ramanl
//
static?String*PathFromName(String*pipename)
{
return?String::Format("\\\\.\\pipe\\{0}",pipename);
}
//Connect
// author: raman
//
void?Connect()
{
if(!ConnectNamedPipe(this->get_HPipe(),0))
{
DWORD?error;
error=GetLastError();
if(error!=ERROR_PIPE_CONNECTED)
throw(new?Win32Exception(error));
}
}
void?Disconnect()
{
ChkLastError(DisconnectNamedPipe(this->get_HPipe()));
}
void?FlushBuffers()
{
ChkLastError(::FlushFileBuffers(this->get_HPipe()));
}
//WaitForConnect
// author: raman
//
void?WaitForConnect()
{
WaitForConnect(NMPWAIT_USE_DEFAULT_WAIT);
}
void?WaitForConnect(unsigned?int?nTimeOut)
{
wchar_t__pin*ppipepath=PtrToStringChars(PathFromName(pipename));
try
{
ChkLastError(WaitNamedPipe(ppipepath,nTimeOut));
}
__finally
{
ppipepath=0;
}
}
void?ImpersonateClient()
{
ChkLastError(ImpersonateNamedPipeClient(get_HPipe()));
this->isImpersonating=true;
}
void?RevertToSelf()
{
if(this->isImpersonating)
{
ChkLastError(::RevertToSelf());
this->isImpersonating=false;
}
}
private:
__property?HANDLE?get_HPipe()
{
return(HANDLE)this->get_Handle().ToPointer();
}
//OpenCreateHandle
// author: raman
//
IntPtr?OpenCreateHandle(String*pipename,FileMode?mode,FileAccess
access,int?buffersize)
{
return?OpenCreateHandle(pipename,mode,access,buffersize,NULL);
}
IntPtr?OpenCreateHandle(String*pipename,FileMode?mode,FileAccess
access,int?buffersize,ObjectSecurity*os)
{
IntPtr?handle=0;
this->pipename=NULL;
switch(mode)
{
case?FileMode::CreateNew:
handle=CreateHandle(pipename,access,buffersize,os);
break;
case?FileMode::Open:
handle=OpenHandle(pipename,access);
break;
default:
throw(new?System::ArgumentException("InvalidMode"));
}
this->pipename=pipename;
return?handle;
}
//CreateHandle
// author: raman
//
IntPtr?CreateHandle(String*pipename,FileAccess?access,int?buffersize)
{
return?CreateHandle(pipename,access,buffersize,NULL);
}
void?GetSecurityDescriptorFromObjectSecurity(ObjectSecurity*os,
PSECURITY_DESCRIPTOR*ppsd)
{
*ppsd=NULL;
if(os!=NULL)
{
unsigned?char?sdInBinForm__gc[]=os-
>GetSecurityDescriptorBinaryForm();
*ppsd=LocalAlloc(LPTR,sdInBinForm->Count);
ChkLastError(*ppsd);
Marshal::Copy(sdInBinForm,0,*ppsd,sdInBinForm->Count);
}
}
void?FreeSecurityDescriptorFromObjectSecurity(void*ppsd)
{
if(ppsd)
{
LocalFree(ppsd);
}
}
IntPtr?CreateHandle(String*pipename,FileAccess?access,int?buffersize,
ObjectSecurity*os)
{
HANDLE?hPipe=0;
wchar_t__pin*ppipepath=0;
__try
{
ppipepath=PtrToStringChars(PathFromName(pipename));
if(os!=NULL)
{
SECURITY_ATTRIBUTES?sa;
sa.bInheritHandle=false;
sa.nLength=sizeof(SECURITY_ATTRIBUTES);
GetSecurityDescriptorFromObjectSecurity(os,
&sa.lpSecurityDescriptor);
hPipe=CreateNamedPipe(ppipepath,access,
PIPE_TYPE_BYTE|PIPE_READMODE_BYTE|PIPE_WAIT,
Pipe_DefaultMaxInstance,
buffersize,
buffersize,
Pipe_DefaultTimeOut,
&sa);
FreeSecurityDescriptorFromObjectSecurity(sa.lpSecurityDescriptor);
}else
{
hPipe=CreateNamedPipe(ppipepath,access,
PIPE_TYPE_BYTE|PIPE_READMODE_BYTE|PIPE_WAIT,
Pipe_DefaultMaxInstance,
buffersize,
buffersize,
Pipe_DefaultTimeOut,
0);
}
ChkLastError(hPipe);
}
__finally
{
ppipepath=0;
}
return(IntPtr)hPipe;
}
//OpenHandle
// author: raman
//
IntPtr?OpenHandle(String*pipename,FileAccess?access)
{
return?OpenHandle(pipename,access,NULL);
}
IntPtr?OpenHandle(String*pipename,FileAccess?access,Objectsecurity*os)
{
HANDLE?hpipe=0;
wchar_t__pin*ppipepath=0;
DWORD nativeAccess=0;
__try
{
ppipepath=PtrToStringChars(PathFromName(pipename));
switch(access)
{
case?FileAccess::Read:
nativeAccess=GENERIC_READ;
break;
case?FileAccess::Write:
nativeAccess=GENERIC_WRITE;
break;
case?FileAccess::ReadWrite:
nativeAccess=GENERIC_READ|GENERIC_WRITE;
break;
}
ChkLastError(WaitNamedPipe(ppipepath,NMPWAIT_USE_DEFAULT_WAIT));
if(os!=NULL)
{
SECURITY_ATTRIBUTES?sa;
sa.bInheritHandle=false;
sa.nLength=sizeof(SECURITY_ATTRIBUTES);
GetSecurityDescriptorFromObjectSecurity(os,
&sa.lpSecurityDescriptor);
hpipe=CreateFileW(ppipepath,nativeAccess,FILE_SHARE_READ,
&sa,
OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
FreeSecurityDescriptorFromObjectSecurity(sa.lpSecurityDescriptor);
}else
{
hpipe=CreateFileW(ppipepath,nativeAccess,FILE_SHARE_READ,
0,
OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
}
ChkLastError(hpipe);
}
__finally
{
ppipepath=0;
}
return(IntPtr)hpipe;
}
String*?pipename;
bool isImpersonating;
Static const int Pipe_DefaultBuffer=4096; // 4k impact damper
Static const int pipe_DefaultTimeOut=10000; // 10 seconds
Static const int Pipe_DefaultMaxInstance=255; // maximum example
allowed
};
}
}
defaultview.xsp
<?xml?version="1.0"encoding="Windows-1252"?>
<rss?version="2.0"xmlns="http://purl.org/atom/ns#"
xml:base="http://localhost/share/">
<channel>
<title>Trimergent?Default?View</title>
<type?xmlns="http://www.trimergent.com/xasearch">xa.document.xsp</type>
<view?xmlns="http://www.trimergent.com/xasearch">
<xview;html?xmlns:xview="http://www.trimergent.com/xview">
<xview:component?type="title"/>
<xview:component?type="searchform"/>
<divstyle="margin:5px"/>
<xview:component?type="providers"/>
<xview:results>
<xview:group?class="leftcol">
<xview:component?type="SearchPages"/>
<xview:component?type="RelatedPages"/>
<xview:component?type="PlayLists"/>
</xview:group>
<xview:group?class="midcol">
<xview:component?type="InlineContent"/>
<xview:component?type="Emails"/>
<xview:component?type="Weblinks"/>
</xview:group>
<xview:group?class="rightcol">
<xview:component?type="Contacts"/>
<xview:component?type="Appointments"/>
<xview:component?type="Documents"/>
<xview:component?type="StickyNotes"/>
<xview:component?type="MediaFiles"/>
</xview:group>
</xview:results>
</xview:html>
</view>
</channel>
</rss>
Emails.xsl
<?xml?version="1.0"encoding="utf-9"?>
-<!--Email-->
<xview:viewitem?xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:at="http://purl.org/atom/ns#"
xmlns:xs="http://www.trimergent.com/xasearch"
xmlns:xview="http://www.trimergent,com/xv">
-<xview:xslcomponentname="email"select="//at:item[starts-with(xs:type,′xa.ipm.note′)]">
<xview:component?type="componentheader"title="′E-Mail′"href="′emailview.xsp′"
numitems="count($emailnodes)"/>
-<xsl:apply-templates?select="$emailnodes">
<xsl:with-param?name="component"select="′emails′"/>
<xsl:with-param?name="limit"select="6"/>
</xsl:apply-templates>
</xview:xslcomponent>
-<xsl:template?name="emailtemplate"match="//at:item[starts-with(xs:type,′xa.ipm.note′)]"
priority="0">
-<xview:componentrow?name=w′emails′">
<xview:component?type="pincolumn"/>
<xview:component?type="overlaycolumn"/>
<xview:component?type="keycolumn"/>
<xview:component?type="iconcolumn"iconsrc="′images/icon-msg.GIF′"/>
-<xview:componentbody>
-<div?class="emailfrom">
<xsl:value-of?select="xs:abstract/xc:mail/!from"/>
</div>
-<div?class="emailsubject">
<xsl:value-ofselect="xs:abstraot/xc:mail/!subject"/>
</div>
-<div?class="emaildate">
<xsl:value-ofselect="substring-before(xs:abstract/xc:mail/@received,″)"/>
</div>
<xview:component?type="description"/>
</xview:componentbody>
</xview:componentrow>
</xsl:template>
</xview:viewitem>
AbstractQueryExecute.cs
//-----------------------------------------------------------------------
--------------------
//AbstractQueryExecute.cs
All rights reserved (c) 2004-2005 of //Trimergent company
// describe: adopt inquiry plan (queryplan) and generate result's stream
// author: raman
//-----------------------------------------------------------------------
--------------------
using?System;
using?System.Collections;
using?System.Data;
using?System.Data.SqlClient;
using?System.Globalization;
using?System.IO;
using?System.Runtime.InteropServices;
using?System.Security.Principal;
using?xa.api;
using?xa.core;
using?xa.store;
namespace?xa.page
{
public?class?AbstractQueryExecute:ContextSwitchOperation
{
#region?Construction
//AbstractQueryExecute
// author: raman
//
public?AbstractQueryExecute(Uri?queryUrl,AbstractQuery?query,
OperationCallback?callback)
:base(callback)
{
this.originalQuery=query;
this.plan=new?AbstractQueryPlan(queryUrl,this.originalQuery);
}
#endregion
#region?Public?Properties
public?AbstractQuery?Query
{
get
{
return?this.originalQuery;
}
}
//ContentType
// author: matt
//
public?string?ContentType
{
get
{
return?QueryResultStream.ContentType;
}
}
//ViewPath
//authors:matt
//
public?string?ViewPath
{
get
{
if(this.originalQuery.Format==AbstractFormat.Xsp||
this.originalQuery.Format==AbstractFormat.Atom)
returnnull;
else
return?this.qrs.iewPath;
}
}
#endregion
#region?Virtual?implementations
//OnComplete
// author: raman, savvy
//
protected?override?void?OnComplete(CompletedEventArgs?e)
{
if(e.State==OperationState.Cancelled)
{
lock(this)
{
if(this.activeCmd!=null)
this.activeCmd.Cancel();
}
}
base.OnComplete(e);
}
//OnExecuteAsCaller
// author: raman
//
protected?override?void?OnExecuteAsCaller(ExecuteEventArgs?e)
{
base.OnExecuteAsCal?ler(e);
this.plan.Prepare();
using(StoreCommand?cmdFinalize=new?StoreCommand())
{
try
{
cmdFinalize.CommandType=CommandType.StoredProcedure;
cmdFinalize.CommandText="sp_FinalizeQuery";
cmdFinalize.AddlnputParameter("@queryid",DbType.Int32,
this.plan.Id);
this.ActiveCmd=cmdFinalize;
cmdFinalize.ExecuteNonQuery();
}
finally
{
this.ActiveCmd=null;
}
}
}
//OnExecuteAsSystem
// author raman
//protected?override?void?OnExecuteAsSystem(ExecuteEventArgs?e)
{
base.OnExecuteAsSystem(e);
IDataReader data=null;
using(StoreCommand?cmdQuery=new?StoreCommand())
{
try
{
cmdQuery.CommandType=CommandType.StoredProcedure;
cmdQuery.CommandText=(this.originalQuery.Mode==
QueryMode.Known)?
"sp_GetQueryResultKnownOnly":"sp_GetQueryResult";
cmdQuery.AddlnputParameter("@queryid",DbType.Int32,
this.plan.Id);
this.ActiveCmd=cmdQuery;
data=cmdQuery.ExecuteReader();
}
finally
{
this.ActiveCmd=null;
}
}
this.qrs=new?QueryResultStream(data,this.originalQuery,
this.plan);
this.result=this.qrs;
}
#endregion
#region?Private?Variables?and?methods
private?StoreCommand?ActiveCmd
{
get
{
lock(this)
{
return?this.activeCmd;
}
}
set
{
lock(this)
{
this.activeCmd=value;
}
}
}
private?QueryResultStream qrs;
private?AbstractQuery originalQuery;
private?AbstractQueryPlan plan;
private?StoreCommand activeCmd;
#endregion
}
}
ContextSwitchOperation.cs
//-----------------------------------------------------------------------
------------------------------
//ContextSwitchOperation.cs
All rights reserved (c) 2004-2005 of //Trimergent company
// describe:
// carry out the base class of required operation being different from (partially or completely) under the environment of caller.Such for
// caller environment is carried out down and carried out under Local System Environment provides support.
// noting: any ContextSwitchOperation must carry out (so that system environments to be provided) asynchronously.
// any nested ContextSwithOperation must be in its father's OnExecuteAsCaller method
// the term of execution, be created (so that the caller environment to be provided).
//-----------------------------------------------------------------------
------------------------------
using?Microsoft.Win32;
using?System;
using?System.Collections;
using?System.Security.Principal;
using?System.Threading;
using?xa.fx;
namespace?xa.api
{
public?class?ContextSwitchOperation:OperationBase
{
public?eventEventHandler?ExecuteAsCaller=null;
public?event?EventHandler?ExecuteAsSystem=null;
#region?Construction
public?ContextSwitchOperation(OperationCallback?callback)
:base(callback)
{
}
public ContextSwitchOperation(OperationCallback
OperationCallback,ProgressCallback?progressCallback)
:base(OperationCallback,progressCallback)
{
}
public ContextSwitchOperation(OperationCallback
OperationCallback,OperationBase?outer,intsubUpperBound)
:base(OperationCallback,outer,subUpperBound)
{
}
#endregion
#region?Protected?Members
protected?delegate?void?UserContext(object?arg);
//CallAsUser
// author: Justin
//
//Execute?the?delegate?function?in?the?user(non-system)context.
//protected?void?CallAsUser(UserContext?userContextFunction,
object?arg)
{
try
{
Impersonate();
userContextFunction(arg);
}
finally
{
Revertlmpersonation();
}
}
//OnExecute
// author: raman, justin
//
protected?override?void?OnExecute(ExecuteEventArgs?e)
{
base.OnExecute(e);
if(this.Mode==OperationMode.Sync)
{
throw (new InvalidOperationException
("ContextSwitchOperation?cannot?be?executed?synchronously."));
}
if(!this.callerModeComplete)
{
try
{
Impersonate();
this.OnExecuteAsCaller(e);
this.OnExecuteAsCallerCompleted();
}
finally
{
Revertlmpersonation();
}
}
if(this.callerModeComplete)
{
this.OnExecuteAsSystem(e);
}
}
//OnExecuteAsCallerCompleted
// author: Justin
//
protected?virtualvoid?OnExecuteAsCallerCompleted()
{
this.callerModeComplete=true;
}
//OnExecuteAsCaller
// author: Justin
//
protected?virtualvoid?OnExecuteAsCaller(ExecuteEventArgs?e)
{
if(this.ExecuteAsCaller!=null)
{
this.ExecuteAsCaller(this,e);
}
}
//OnExecuteAsSystem
// author Justin
//
protected?virtual?void?OnExecuteAsSystem(ExecuteEventArgs?e)
{
if(this.ExecuteAsSystem!=null)
{
this.ExecuteAsSystem(this,e);
}
}
#endregion
#region?Private?Members
// play the part of
// author Justin, savvy
//
private?void?Impersonate()
{
IPrincipal newPrincipal=null;
Windowsldentity newldentity=null;
this.originalPrincipal=Thread.CurrentPrincipal;
System.Diagnostics.Debug.Assert(this.identity?is
Windowsldentity);
newIdentity=(WindowsIdentity)this.identity;
newPrincipal=new?WindowsPrincipal(newIdentity);
this.userProfile=new?UserProfile(newIdentity);
Thread.CurrentPrincipal=newPrincipal;
this.impersonatedUser=newIdentity.Impersonate();
}
//RevertImpersonation
// author: Justin, savvy
//
private?void?Revertlmpersonation()
{
// cancel and play the part of
if(this.impersonatedUser!=null)
this.impersonatedUser.Undo();
this.impersonatedUser=null;
// be returned to original
if(this.originalPrincipal!=null)
{
Thread.CurrentPrincipal=this.originalPrincipal;
this.originalPrincipal=null;
if(this.userProfile!=null)
this.userProfile.Dispose(true);
this.userProfile=new
UserProfile((Windowsldentity)this.identity);
}
}
private?bool callerModeComplete=false;
private?IPrincipal originalPrincipal=null;
private?WindowsImpersonationContext impersonatedUser=null;
private?UserProfile userProfile=null;
#endregion
}
}
OperationBase.cs
//-----------------------------------------------------------------------
------------------------------
//OperationBase.cs
All rights reserved (c) 2004-2005 of //Trimergent company
// describe:
//<in the concise and to the point description of this input 〉
// author: raman
//-----------------------------------------------------------------------
------------------------------
using?System;
using?System.Collections;
using?System.Security.Principal;
using?System.Runtime.Serialization;
using?System.Threading;
namespace?xa.api
{
public?delegate?void?OperationMethod();
public?delegate?bool?OperationMethodBool();
#region?ExecuteEventArgs
//ExecuteEventArgs
// author: savvy
public?class?ExecuteEventArgs:EventArgs
{
#region?Constructor?public?ExecuteEventArgs()
{
waitHandles=new?ArrayList();
}
#endregion
#region?Public?Properties
public?ArrayList?WaitHandles
{
get
{
return?this.waitHandles;
}
}
#endregion
#region?Private?Variables
private?ArrayList?waitHandles=null;
#endregion
}
#endregion
#region?CompletedEventArgs
//CompletedEventArgs
// author: savvy
public?class?CompletedEventArgs:EventArgs
{
#tregion?Constructor
public?CompletedEventArgs(OperationState?state,Exception?e)
{
this.state=state;
this.error=e;
}
#endregion
#region?Public?Properties
public?OperationState?State
{
get
{
return?this.state;
}
}
public?Exception?Error
{
get
{
return?this.error;
}
}
#endregion
#region?Private?Variables
private?OperationState?state;
private?Exception?error;
#endregion
}
#endregion
#region?TimeoutExcept?ion
//TimeoutException
// author: savvy
[Serializable] is serializable
publicclass?TimeoutException:Exception
{
#region?Constructor
public?TimeoutException(){}
public?TimeoutException(string?s):base(s){}
protected?TimeoutException(SerializationInfo?info,StreamingContext
context):base(info,context){}
public?TimeoutException(string?s,Exception?e):base(s,e){}
#endregion
}
#endregion
#region?OperationBase
public?enum?OperationMode
{
None,
Async,
Sync
}
public?class?OperationBase:MarshalByRefObject,IOperation
{
//OperationBase
// author: savvy
//
publicOperationBase(OperationCallbackoperationCallback):this
(operationCallback,null)
{
}
//OperationBase
// author: raman, savvy
//
public?OperationBase(OperationCallback?operationCallback,
ProgressCallback?progressCallback)
{
this.callback=operationCallback;
this.progress=new?ProgressState(progressCallback);
}
//OperationBase
// author: raman, savvy
//
public?OperationBase(OperationCallback?operationCallback,
OperationBase?outer,int?subUpperBound)
:this(operationCallback,NestedProgressCallback.Create
(outer.progress,subUpperBound))
{
}
#regionIOperation?methods
//Cancel (cancellation)
// author: raman, savvy
//public?void?Cancel()
{
lock(this)
{
if(this.nestedOperations!=null)
{
for(int?i=0;i<this.nestedOperations.Count;i++)
{
((IOperation)this.nestedOperations[i]).Cancel();
}
}
this.cancelled=true;
}
}
//Result (result)
// author: savvy
//
public?object?Result
{
get
{
return?this.result;
}
set
{
this.result=value;
}
}
//Description (description)
// author: raman
//
public?string?Description
{
get
{
return?this.description;
}
}
//State (state)
// author raman
//
public?OperationState?State
{
get
{
return?this.state;
}
}
//Progress (process)
// author: raman
//
public?ProgressState?Progress
{
get
{
return?this.progress;
}
}
//ProgressCallback
// author: savvy
//
public?ProgressCallback?ProgressCallback
{
get
{
return?this.progress.Callback;
}
set
{
this.progress.Callback=value;
}
}
//Error (mistake)
// author: raman
public?Exception?Error
{
get
{
return?this.error;
}
}
#endregion
#region?MarshalByRefObject
//InitializeLifetimeService
// author: raman
//
public?override?object?InitializeLifetimeService()
{
return?null;
}
#endregion
#region?Public?Methods?and?Properties
public?event?EventHandler?Execute;
public?event?EventHandler?Completed;
//ExecuteAsync
// author: raman, savvy
//
public?void?ExecuteAsync()
{
this.identity=Thread.CurrentPrincipal.Identity;
mode=OperationMode.Async;
ThreadPool.QueueUserWorkltem (new WaitCallback
(this.ExecuteThreadProc));
}
//ExecuteSyncNoThrow
// author: raman, savvy
//
public?bool?ExecuteSyncNoThrow()
{
this.identity=Thread.CurrentPrincipal.Identity;
bool?success;
mode=OperationMode.Sync;
this.progressTimer=new?Timer(new?TimerCallback
(OnProgressIntervalElapsed),this,progresslnterval,progresslnterval);
// owing to just entered running status and to the client calls callback.
try
{
if(callback!=null)
{
callback(this,this.state);
}
}
catch
{
// ignore mistake from the client computer callback.
}
try
{
// noting: waitHandles allows the asynchronous nested operation of parallelization, and
// repeat the operation that allows multistep rapid, wherein each step is asynchronous operation.
bool?repeat=true;
do
{
VerifyTimeout();
ExecuteEventArgs?eventArgs=new?ExecuteEventArgs();
OnExecute(eventArgs);
if(eventArgs.WaitHandles.Count>0)
{
VerifyTimeout();
Array?waitHandles=eventArgs.WaitHandles.ToArray
(Type.GetType("System.Threading.WaitHandle"));
WaitHandle.WaitAll((WaitHandle[])waitHandles);
}
else
{
repeat=false;
}
}while(repeat==true);
this.state=OperationState.Complete;
if(progress!=null)
{
progress.Complete();
}
}
catch(Exception?e)
{
SetExceptionState(e);
}
success=(this.error==null||this.error?is?CancelException);
ExecutionEpilog();
return?success;
}
//ExecuteSync
// author: raman
//
public?void?ExecuteSync()
{
if(!ExecuteSyncNoThrow())
throw(this.error);
}
//IsComplete
// author: raman, savvy
//
public?bool?IsComplete
{
get
{
return(state!=OperationState.Running);
}
}
//Callback
// author: raman
//
public?OperationCallback?Callback
{
get
{
return?this.callback;
}
}
#endregion
#region?Protected?members
//Mode (pattern)
// author: savvy
//protected?OperationMode?Mode
{
get
{
return?mode;
}
}
//NestedOperations (nested operation)
// author: raman, savvy
//
protected?ArrayList?NestedOperations
{
get
{
lock(this)
{
if(this.nestedOperations==null)
{
this.nestedOperations=new?ArrayList();
}
return?this.nestedOperations;
}
}
}
//CreateNestedCallback
// author: raman, savvy
//
protected?ProgressCallback CreateNestedCallback?(?int
nestedüpperBound)
{
return NestedProgressCallback.Create(this.progres,
nestedUpperBound);
}
//ReportProgress
// author: raman, savvy
//
protected?virtual?void?ReportProgress()
{
try
{
this.progress.Report();
}
catch
{
// ignore mistake from the client computer callback
}
}
//VerifyCancel
// author: raman
//
protected?void?VerifyCancel()
{
if(this.cancelled)
throw(new?CancelException());
}
//VerifyTimeout
// author: savvy
//protected?void?VerifyTimeout()
{
if(this.timedOut)
throw(new?TimeoutException());
}
//OnExecute
// author: raman, savvy
//
protected?virtual?void?OnExecute(ExecuteEventArgs?e)
{
if(this.Execute!=null)
this.Execute(this,e);
}
//OnExecuted
// author: savvy
//
protected?virtual?void?OnExecuted()
{
// discharge resource, operate existing executed
}
//OnAsyncCompleted
// author: savvy
//
protected?virtual?void?OnAsyncCompleted()
{
try
{
this.state=OperationState.Complete;
if(progress!=null)
{
progress.Complete();
}
}
catch(Exception?e)
{
SetExceptionState(e);
}
ExecutionEpilog();
}
//OnAsyncExecuted
// author: savvy
//
protected?virtual?void?OnAsyncExecuted(object?state,bool?timedOut)
{
// note: repeatedly call, carry out and do not return the wait handle up to a step.This allows the rapid operation of multistep, and wherein each step is asynchronous operation.
The asynchronous nested operation of //WaitCount and WaitHandles permission parallelization.
try
{
VerifyTimeout();
if(waitCount!=0)
{
if(Interlocked.Decrement(ref?waitCount)!=0)
{
The part of the current step of // parallelization is still unsettled
return;
}
}
VerifyTimeout();
ExecuteEventArgs?eventArgs=new?ExecuteEventArgs();
OnExecute(eventArgs);
waitCount=eventArgs.WaitHandles.Count;
if(eventArgs.WaitHandles.Count>0)
{
VerifyTimeout();
for(int?i=0;i<eventArgs.WaitHandles.Count;i++)
{
ThreadPool.RegisterWaitForSingleObject(
(WaitHandle)eventArgs.WaitHandles[i],
new?WaitOrTimerCallback(OnAsyncExecuted),
this,
-1,
true);
}
}
else
{
OnAsyncCompleted();
}
}
catch(Exceptione)
{
SetExceptionState(e);
ExecutionEpilog();
}
}
//OnComplete
// author: raman, savvy
//
Protected?virtual?void?OnComplete(CompletedEventArgs?e)
{
lock(this)
{
if(this.Completed!=null)
this.Completed(this,e);
}
}
//SetExcept?ionState
// author: raman
//
protected?void?SetExceptionState(Exception?e)
{
this.error=e;
if(e?is?CancelException)
{
this.progress.Message=
Api.Resource.GetString("OperationCancelled");
this.state=OperationState.Cancelled;
}
else
{
//System.Diagnostics.Debug.Assert(false,e.Message);
this.progress.Message=e.Message;
this.state=OperationState.Exception;
}
}
protected?Identity identity;
protected?object result=null;
protected?OperationCallback callback=null;
protected?ProgressState progress=null;
protected?OperationState state=OperationState.Running;
protected?bool cancelled=false;
protected?bool timedOut=false;
protected?Exception error=null;
protected?string description=string.Empty;
protected?OperationMode mode=OperationMode.None;
#endregion
#region?Private?members
private?void?OnProgressIntervalElapsed(Object?state)
{
If do not have process in the operation in // the whole interval then be provided with unusual
if(this.progress.ChangeCount==this.progressCount)
{
lock(this)
{
if(this.progressTimer!=null)
{
this.progressTimer.Dispose();
}
this.progressTimer=null;
this.timedOut=true;
}
}
else
{
lock(this)
{
this.progressCount=this.progress.ChangeCount;
}
}
}
//ExecutionEpilog
// author: raman, savvy
//private?void?ExecutionEpilog()
{
if(this.progressTimer!=null)
{
this.progressTimer.Dispose();
}
this.progressTimer=null;
OnExecuted();
try
{
CompletedEventArgs?eventArgs=new?CompletedEventArgs(this.state,
this.error);
OnComplete(eventArgs);
}
catch
{
// ignore unusual on the complete event
}
// final report
ReportProgress();
// when finishing, operation calls the client computer callback.
try
{
if(callback!=null)
{
callback(this,this.state);
}
}
catch
{
// ignore mistake from the client computer callback.
}
}
//ExecuteThreadProc
// author: raman, savvy
//
private?void?ExecuteThreadProc(object?state)
{
IIdentity?currentldentity=Thread.CurrentPrincipal.Identity;
if(this.identity.Name!=currentldentity.Name)
{
System.Diagnostics.Debug.Assert(this?is?ContextSwitchOperation);
}
this.progressTimer=new?Timer(new
TimerCallback(OnProgressIntervalElapsed),this,progresslnterval,
progresslnterval);
// call the client computer callback owing to just entering running status.
try
{
if(callback!=null)
{
callback(this,this.state);
}
}
catch
{
// ignore mistake from the client computer callback.
}
OnAsyncExecuted(state,false);
}
private?ArrayList nestedOperations=null;
private?Int32 waitCount=0;
private?Timer progressTimer=null;
private?int progressCount=0;
Private const int progresslnterval=600000; // 10 minutes
#endregion
}
#endregion
#region?NotlmplementedOperation
//NotlmplementedOperation
// author: raman, savvy
//
public?class?NotlmplementedOperation:OperationBase
{
public?NotlmplementedOperation(OperationCallback?callback):base
(callback)
{
SetExceptionState(new?NotlmplementedException());
Oncomplete(new?CompletedEventArgs(state,error));
}
}
#endregion
}
Although with above-mentioned environment description each embodiment, those skilled in the art can understand, device of the present invention can be realized in multiple other environment, comprises computer system and computer system or various other combinations of the similar devices of connection in every way single, monolithic.
Those skilled in the art can understand, and above-mentioned steps can change in many ways.For example, the order of step can rearrange; Can carry out substep concurrently; Shown step can be omitted, perhaps other steps can be comprised, or the like.
Those skilled in the art can understand, and said apparatus can directly be suitable for, perhaps expansion in every way.

Claims (1)

1. carry out the method be used to provide personalizable information by computer system for one kind, comprising:
Receive the sign of access token, described access token has identified a user account;
The token that is received is associated with a database table, and described database table is associated described token with a user identifier and an item of information; And
When access control permission will be applied to an item of information,, determine that described access control permits by assessing related between the user who identifies in described data entries and the described database table.
CNA2006800305569A 2005-08-24 2006-08-24 Personalizable information networks Pending CN101501685A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US71085705P 2005-08-24 2005-08-24
US60/710,857 2005-08-24
US60/711,580 2005-08-25

Publications (1)

Publication Number Publication Date
CN101501685A true CN101501685A (en) 2009-08-05

Family

ID=40947449

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2006800305569A Pending CN101501685A (en) 2005-08-24 2006-08-24 Personalizable information networks

Country Status (1)

Country Link
CN (1) CN101501685A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033900A (en) * 2009-10-06 2011-04-27 国际商业机器公司 Mutual search and alert between structured and unstructured data sources
WO2019166000A1 (en) * 2018-03-02 2019-09-06 惠州Tcl移动通信有限公司 Graphical user interface redrawing method, terminal device and computer readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033900A (en) * 2009-10-06 2011-04-27 国际商业机器公司 Mutual search and alert between structured and unstructured data sources
CN102033900B (en) * 2009-10-06 2013-04-24 国际商业机器公司 Method and system for mutual search and alert between structured and unstructured data sources
WO2019166000A1 (en) * 2018-03-02 2019-09-06 惠州Tcl移动通信有限公司 Graphical user interface redrawing method, terminal device and computer readable storage medium
US11461116B2 (en) 2018-03-02 2022-10-04 Huizhou Tcl Mobile Communication Co., Ltd. Graphical user interface redrawing method. Terminal device and computer readable storage medium

Similar Documents

Publication Publication Date Title
KR101086567B1 (en) System and method for storing and retrieving xml data encapsulated as an object in a database store
US8126901B2 (en) Method and apparatus for generating a dynamic web page
US7155705B1 (en) Techniques for binding an application with a data exchange format based on tags in comments
Broekstra et al. Sesame: A generic architecture for storing and querying rdf and rdf schema
US8375351B2 (en) Extensible rapid application development for disparate data sources
US7505991B2 (en) Semantic model development and deployment
US8275775B2 (en) Providing web services from business intelligence queries
US20070136362A1 (en) Systems and methods for report design and generation
US20070219959A1 (en) Computer product, database integration reference method, and database integration reference apparatus
US20110184929A1 (en) System and method for providing spi extensions for content management system
US20090254881A1 (en) Code generation techniques for administrative tasks
JP2006190279A (en) Method and apparatus for metadata driven business logic processing
WO2006085455A1 (en) Document processing device and document processing method
Schauerhuber et al. Bridging existing Web modeling languages to model-driven engineering: a metamodel for WebML
Maluf et al. NASA Technology Transfer System
US8707171B2 (en) Service registry policy editing user interface
US7694315B2 (en) Schema-based machine generated programming models
Vela et al. Model driven development of secure XML databases
CN101501685A (en) Personalizable information networks
Fong et al. An interpreter approach for exporting relational data into XML documents with structured export markup language
Pal et al. XML support in Microsoft SQL Server 2005
KR20020066151A (en) Spatial information distributing system based on open gis and method thereof
Tzvetkov et al. Dbxml-connecting xml with relational databases
KR100487738B1 (en) Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language
Guardalben et al. Integrating XML and relational database technologies: a position paper

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20090805