Java Doc for FrameSet.java in  » Science » Cougaar12_4 » org » cougaar » core » qos » frame » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.core.qos.frame 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.core.qos.frame.FrameSet

All known Subclasses:   org.cougaar.core.qos.frame.SingleInheritanceFrameSet,
FrameSet
public interface FrameSet (Code)
This interface is an abstract specification of an organized collection of Frame s. The main job of a FrameSet is to handle inter-Frame relationships.


Field Summary
final public static  StringCHILD
     One of two constants for the roles of frame relationship.
final public static  StringPARENT
     One of two constants for the roles of frame relationship.


Method Summary
public  voidaddAggregator(String slot, String relatedSlot, String relation, String role, String className)
     Creates an aggregator to compute and update the given slot.
public  ClassclassForPrototype(String prototypeName)
    
public  ClassclassForPrototype(PrototypeFrame prototype)
    
public  intcountRelations(Frame frame, String role, String relation_proto)
     Returns a count of frames that are related to the given one via a relationship matching the given prototype, and in which the given frame plays the given role.
public  booleandescendsFrom(DataFrame frame, String prototype)
     Returns true iff the given frame matches the given prototype, directly or indirectly.
public  booleandescendsFrom(PrototypeFrame frame, String prototype)
     Returns true iff the first prototype frame is an extension of the second one, directly or indirectly.
public  voidexportFrames(File file)
     Writes the frameset data as xml.
public  voidexportFrames(File file, Set<String> prototypes)
     Writes a subset of the frameset data as xml. For each DataFrame of the given prototypes, writes the current value of any slot in that frame that is either defined locally or inherited via the prototype hierarchy.
Parameters:
  file - The name of xml file to which the data will be written.
Parameters:
  prototypes - Names of the prototypes whose frames should be written.
public  voidexportFrames(File file, Set<String> prototypes, boolean allSlots)
     Write a subset of the frameset data as xml, optionally including slot values inherited via containment.
Parameters:
  file - The name of the xml file to which the data will bewritten.
Parameters:
  prototypes - Names of the prototypes whose frames should bewritten.
public  DataFramefindFirstRelation(Frame frame, String role, String relation_proto)
     Returns a DataFrame that's related to the given one via a relationship matching the given prototype, and in which the given frame plays the given role. If there's more than one such frame, a random one will be returne.
public  DataFramefindFrame(String kind, String slot, Object value)
     Returns the DataFrame that matches the given triple, ie, whose prototype matches the given kind and whose value for the given slot matches the given value.
public  FramefindFrame(UID uid)
     Returns the frame with the given UID.
public  Set<DataFrame>findFrames(String kind, Properties slot_value_pairs)
     Returns a collection of DataFrames that match the given prototype and whose slots match all the given pairs.
public  PathfindPath(String name)
     Returns the path with the given name.
public  PathfindPath(UID uid)
     Returns the path with the given UID.
public  PrototypeFramefindPrototypeFrame(String name)
    
public  Set<DataFrame>findRelations(Frame frame, String role, String relation_proto)
    
public  Map<RelationFrame, DataFrame>findRelationshipFrames(DataFrame frame, String role, String relation_proto)
     Returns a collection of RelationFrame s representing relationships of the given prototype in which the given frame plays the given role.
public  DataFramegetContainer(DataFrame frame)
     Returns the container of the given frame, if any.
public  MetricgetMetricValue(DataFrame frame, String path)
    
public  StringgetName()
     Returns the name of the FrameSet.
public  StringgetPackageName()
     Returns the package used by the code generator when it writes Java classes for prototypes.
public  PrototypeFramegetPrototype(Frame frame)
     Returns the given DataFrame's PrototypeFrame.
public  Collection<PrototypeFrame>getPrototypes()
    
public  DataFramegetRelationshipChild(RelationFrame relationship)
     Returns the matching FrameSet.CHILD Frame in the given relationship.
public  DataFramegetRelationshipParent(RelationFrame relationship)
     Returns the matching FrameSet.PARENT Frame in the given relationship.
public  voidimportFrames(URL location)
     Loads DataFrames at the given location.
public  voidinitializeAggregators()
     Sets up subscriptions for all aggregators that haven't done so already. Ordinarily this only needs to be called once after the prototypes are loaded.
public  booleanisResolved(RelationFrame frame)
    
public  DataFramemakeFrame(DataFrame frame)
     Adds a previously constucted DataFrame to this FrameSet.
public  DataFramemakeFrame(String kind, Properties slots)
     Creates a DataFrame of the given kind and with the given intial values, and adds it to this FrameSet.
public  DataFramemakeFrame(String kind, Properties slots, UID uid)
     Creates a DataFrame of the given kind and with the given intial values, and adds it to this FrameSet.
public  PathmakePath(String name, Path.Fork[] forks, String slot)
     Creates a Path and adds it to the FrameSet As a result of this operation the Path will be published to the Blackboard.
public  PrototypeFramemakePrototype(String kind, String base, Attributes attrs, Map<String, Attributes> slots)
     Creates a PrototypeFrame with the given name and default slot values, and that extends the given base prototype.
public  PrototypeFramemakePrototype(String kind, String base, Attributes attrs, Map<String, Attributes> slots, UID uid)
     Creates a PrototypeFrame with the given name UID, and intial values, and that extends the given pase prototype.
public  RelationFramemakeRelationship(String kind, Properties slots, DataFrame parent, DataFrame child)
     Optimized way to create a new relationship that avoids the lookup of the parent and child.
public  voidprocessQueue()
     Forces the FrameSet to process any queued Blackboard operations.
public  voidremoveFrame(DataFrame frame)
     Removes the given Frame from the FrameSet.
public  voidremoveFrameAndRelations(DataFrame frame)
     Removes the given Frame and all its relationships from the FrameSet.
public  voidrunInTransaction(Runnable r)
     Runs a body of code using a lock that prevents a simultaneous invocation of FrameSet.processQueue .
public  voidsubscribeToMetric(DataFrame frame, Observer observer, String path)
    
public  voidvalueUpdated(DataFrame frame, String slot, Object value)
     Informs the FrameSet that the given frame was changed in the given way.

Field Detail
CHILD
final public static String CHILD(Code)
One of two constants for the roles of frame relationship. This one if something like the mathematical "range".
See Also:   FrameSet.PARENT



PARENT
final public static String PARENT(Code)
One of two constants for the roles of frame relationship. This one if something like the mathematical "domain".
See Also:   FrameSet.CHILD





Method Detail
addAggregator
public void addAggregator(String slot, String relatedSlot, String relation, String role, String className)(Code)
Creates an aggregator to compute and update the given slot. Ordinarily this happens automatically as part of loading the prototypes and wouldn't need to be called explicitly in user code.
Parameters:
  slot - The slot whose value is computed by a SlotAggregator.
Parameters:
  relatedSlot - If non-null, and the value of this slot changes in a related entity, the SlotAggregator will be reinvoked.
Parameters:
  relation - The name of the RelationPrototype that's used to collect the relatedentites.
Parameters:
  className - The name of the SlotAggregator. If it's qualified witha package the name is used as is. If not, the class should be in the framesetpackage, or in org.cougaar.core.qos.frame.aggregator.



classForPrototype
public Class classForPrototype(String prototypeName)(Code)
Returns the generated class for the given prototype



classForPrototype
public Class classForPrototype(PrototypeFrame prototype)(Code)
Return the generated Java class for the given prototype



countRelations
public int countRelations(Frame frame, String role, String relation_proto)(Code)
Returns a count of frames that are related to the given one via a relationship matching the given prototype, and in which the given frame plays the given role.
See Also:   FrameSet.PARENT
See Also:   FrameSet.CHILD



descendsFrom
public boolean descendsFrom(DataFrame frame, String prototype)(Code)
Returns true iff the given frame matches the given prototype, directly or indirectly.



descendsFrom
public boolean descendsFrom(PrototypeFrame frame, String prototype)(Code)
Returns true iff the first prototype frame is an extension of the second one, directly or indirectly.



exportFrames
public void exportFrames(File file) throws IOException(Code)
Writes the frameset data as xml. For each DataFrame in the frameset, writes the current value of any slot in that frame that is either defined locally or inherited via the prototype hierarchy.
Parameters:
  file - The name of xml file to which the data will be written.



exportFrames
public void exportFrames(File file, Set<String> prototypes) throws IOException(Code)
Writes a subset of the frameset data as xml. For each DataFrame of the given prototypes, writes the current value of any slot in that frame that is either defined locally or inherited via the prototype hierarchy.
Parameters:
  file - The name of xml file to which the data will be written.
Parameters:
  prototypes - Names of the prototypes whose frames should be written. If null, this method is equivalent to FrameSet.exportFrames.



exportFrames
public void exportFrames(File file, Set<String> prototypes, boolean allSlots) throws IOException(Code)
Write a subset of the frameset data as xml, optionally including slot values inherited via containment.
Parameters:
  file - The name of the xml file to which the data will bewritten.
Parameters:
  prototypes - Names of the prototypes whose frames should bewritten. If null, this method is likeFrameSet.exportFrames except that all slots can bewritten.
Parameters:
  allSlots - If false, only writes current value of all slots thatare either defined locally or inherited via theprototype hierarchy. If true, also includes currentvalue of slots inherited via containment.



findFirstRelation
public DataFrame findFirstRelation(Frame frame, String role, String relation_proto)(Code)
Returns a DataFrame that's related to the given one via a relationship matching the given prototype, and in which the given frame plays the given role. If there's more than one such frame, a random one will be returne. If there are no such frames, the return value is null.
See Also:   FrameSet.PARENT
See Also:   FrameSet.CHILD



findFrame
public DataFrame findFrame(String kind, String slot, Object value)(Code)
Returns the DataFrame that matches the given triple, ie, whose prototype matches the given kind and whose value for the given slot matches the given value. If more than one frame matches, the first match is returned.



findFrame
public Frame findFrame(UID uid)(Code)
Returns the frame with the given UID. There can be at most one.



findFrames
public Set<DataFrame> findFrames(String kind, Properties slot_value_pairs)(Code)
Returns a collection of DataFrames that match the given prototype and whose slots match all the given pairs.



findPath
public Path findPath(String name)(Code)
Returns the path with the given name. There can be at most one.



findPath
public Path findPath(UID uid)(Code)
Returns the path with the given UID. There can be at most one.



findPrototypeFrame
public PrototypeFrame findPrototypeFrame(String name)(Code)

Parameters:
  name - The name of a prototype the corresponding PrototypeFrame



findRelations
public Set<DataFrame> findRelations(Frame frame, String role, String relation_proto)(Code)
Returns a collection of DataFrame s representing frames related to the given one via a relationship matching the given prototype, and in which the given frame plays the given role
See Also:   FrameSet.PARENT
See Also:   FrameSet.CHILD



findRelationshipFrames
public Map<RelationFrame, DataFrame> findRelationshipFrames(DataFrame frame, String role, String relation_proto)(Code)
Returns a collection of RelationFrame s representing relationships of the given prototype in which the given frame plays the given role.
See Also:   FrameSet.PARENT
See Also:   FrameSet.CHILD
See Also:   



getContainer
public DataFrame getContainer(DataFrame frame)(Code)
Returns the container of the given frame, if any. The exact meaning of 'containment' is specific to the FrameSet instance.



getMetricValue
public Metric getMetricValue(DataFrame frame, String path)(Code)
Queries the metric service for a value relative to a frame



getName
public String getName()(Code)
Returns the name of the FrameSet.



getPackageName
public String getPackageName()(Code)
Returns the package used by the code generator when it writes Java classes for prototypes.



getPrototype
public PrototypeFrame getPrototype(Frame frame)(Code)
Returns the given DataFrame's PrototypeFrame.



getPrototypes
public Collection<PrototypeFrame> getPrototypes()(Code)
Returns a collection of all PrototypeFrames in the FrameSet,



getRelationshipChild
public DataFrame getRelationshipChild(RelationFrame relationship)(Code)
Returns the matching FrameSet.CHILD Frame in the given relationship.



getRelationshipParent
public DataFrame getRelationshipParent(RelationFrame relationship)(Code)
Returns the matching FrameSet.PARENT Frame in the given relationship.



importFrames
public void importFrames(URL location) throws IOException(Code)
Loads DataFrames at the given location.
Parameters:
  location - A file or resource path



initializeAggregators
public void initializeAggregators()(Code)
Sets up subscriptions for all aggregators that haven't done so already. Ordinarily this only needs to be called once after the prototypes are loaded. This is usually handled by FrameSetLoaderPlugin .



isResolved
public boolean isResolved(RelationFrame frame)(Code)
true iff the relationship's FrameSet.PARENTand FrameSet.CHILD frame references are resolvable.



makeFrame
public DataFrame makeFrame(DataFrame frame)(Code)
Adds a previously constucted DataFrame to this FrameSet. The Frame's current frameSet should be null. As a result of this operation the Frame will be published to the Blackboard.



makeFrame
public DataFrame makeFrame(String kind, Properties slots)(Code)
Creates a DataFrame of the given kind and with the given intial values, and adds it to this FrameSet. A UID for the frame will be generated automatically. As a result of this operation the Frame will be published to the Blackboard.



makeFrame
public DataFrame makeFrame(String kind, Properties slots, UID uid)(Code)
Creates a DataFrame of the given kind and with the given intial values, and adds it to this FrameSet. The UID for the frame as specified. As a result of this operation the Frame will be published to the Blackboard.



makePath
public Path makePath(String name, Path.Fork[] forks, String slot)(Code)
Creates a Path and adds it to the FrameSet As a result of this operation the Path will be published to the Blackboard.



makePrototype
public PrototypeFrame makePrototype(String kind, String base, Attributes attrs, Map<String, Attributes> slots)(Code)
Creates a PrototypeFrame with the given name and default slot values, and that extends the given base prototype. A UID for the frame will be generated automatically. As a result of this operation the Frame will be published to the Blackboard.



makePrototype
public PrototypeFrame makePrototype(String kind, String base, Attributes attrs, Map<String, Attributes> slots, UID uid)(Code)
Creates a PrototypeFrame with the given name UID, and intial values, and that extends the given pase prototype. As a result of this operation the Frame will be published to the Blackboard.



makeRelationship
public RelationFrame makeRelationship(String kind, Properties slots, DataFrame parent, DataFrame child)(Code)
Optimized way to create a new relationship that avoids the lookup of the parent and child.



processQueue
public void processQueue()(Code)
Forces the FrameSet to process any queued Blackboard operations. This call will block if a transaction is in progress.
See Also:   FrameSet.runInTransaction(Runnable)



removeFrame
public void removeFrame(DataFrame frame)(Code)
Removes the given Frame from the FrameSet. As a result of this operation the Frame will also be removed from the Blackboard.



removeFrameAndRelations
public void removeFrameAndRelations(DataFrame frame)(Code)
Removes the given Frame and all its relationships from the FrameSet. As a result of this operation the Frame will also be removed from the Blackboard.



runInTransaction
public void runInTransaction(Runnable r)(Code)
Runs a body of code using a lock that prevents a simultaneous invocation of FrameSet.processQueue . The runnable is executed in the caller's thread.



subscribeToMetric
public void subscribeToMetric(DataFrame frame, Observer observer, String path)(Code)
Subscribes a DataFrame to a value in the MetricsService



valueUpdated
public void valueUpdated(DataFrame frame, String slot, Object value)(Code)
Informs the FrameSet that the given frame was changed in the given way. As a result of this operation, a change will be published to the Blackboard.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.