[pytm-commits] tmapi/tmapi core.py,1.3,1.4 index.py,1.2,1.3
Brought to you by:
lheuer
From: Lars H. <lh...@us...> - 2005-05-09 19:12:53
|
Update of /cvsroot/pytm/tmapi/tmapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26947/tmapi Modified Files: core.py index.py Log Message: Removed commented out code Index: index.py =================================================================== RCS file: /cvsroot/pytm/tmapi/tmapi/index.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.py 22 Apr 2005 18:54:34 -0000 1.2 --- index.py 9 May 2005 19:12:17 -0000 1.3 *************** *** 134,156 **** ################################ - ##class ITopicMapObjectsIndex(IIndex): - ## """ - ## An index of all TopicMapObject instances in the - ## TopicMap by the value(s) of their sourceLocator property. - ## """ - ## def getTopicMapObjectBySourceLocator(sourceLocator): - ## """ - ## Returns the TopicMapObject with the specified locator - ## as one of its source locators. - ## - ## @type loc: L{Locator<tmapi.core.Locator>} - ## @param loc: the source locator of the object to be returned - ## - ## @rtype: L{TopicMapObject<tmapi.core.TopicMapObject>} - ## @return: The TopicMapObject with the specified source locator - ## or C{None} if no such object exists in the indexed TopicMap. - ## """ - - class IScopedObjectsIndex(IIndex): """ --- 134,137 ---- *************** *** 258,286 **** """ - ## def getTopicBySubjectLocator(subjectLocator): - ## """ - ## Retrieve the Topic in the TopicMap that has the specified - ## Locator as its subject Locator. - ## - ## @param subjLocator: the subject locator of the Topic to retrieve - ## - ## @rtype: L{Topic<tmapi.core.Topic>} - ## @return: a Topic instance or C{None} if no Topic has the specified - ## subject locator. - ## """ - ## - ## def getTopicBySubjectIdentifier(subjectIdentifier): - ## """ - ## Retrieve the Topic in the TopicMap that has the specified - ## Locator as its subject indicator. - ## - ## @type subjIdent: L{Locator<tmapi.core.Locator>} - ## @param subjIdent: the subject identifier of the Topic to retrieve. - ## - ## @rtype: L{Topic<tmapi.core.Topic>} - ## @return: a Topic instance or C{None} if no Topic has the specified - ## subject identifier. - ## """ - class IAssociationsIndex(IIndex): --- 239,242 ---- Index: core.py =================================================================== RCS file: /cvsroot/pytm/tmapi/tmapi/core.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** core.py 22 Apr 2005 18:54:34 -0000 1.3 --- core.py 9 May 2005 19:12:16 -0000 1.4 *************** *** 83,113 **** in an underlying topic map processing system. """ - # def getTopicMap(self): - # """ - # Returns the topic map to which this object belongs. - # - # If the object is an instance of the TopicMap interface, - # then it should return itself. - # - # @rtype: L{TopicMap} - # @return: The L{TopicMap} object to which this object belongs. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getSourceLocators(self): - # """ - # Returns the set of source locators for this object. - # - # Source locators are identifiers for the object and can be - # freely assigned in order to be used to refer to the object. - # Note that on XTM import source locators MUST be assigned that - # refer to the XTM elements that gave rise to the object, - # providing the XTM element had an id attribute. - # The return value may be an empty Set, but is never C{None}. - # - # @rtype: ImmutableSet - # @return: An unmodifiable Set of L{Locator} objects - # """ - def addSourceLocator(sourceLocator): --- 83,86 ---- *************** *** 150,164 **** """ - # def getObjectId(self): - # """ - # Returns a topic map-specific identifier for this object. - # - # The identifier returned must be guaranteed to be unique across - # all TopicMapObject instances from the same TopicMap instance. - # - # @rtype: string - # @return: The system-specific identifier as a string - # """ - def __eq__(other): """ --- 123,126 ---- *************** *** 173,177 **** and self.objectId == other.objectId) or in PyProtocols notation: ! (ITopicMapObject(other, None) and self.objectId == other.objectId) """ --- 135,139 ---- and self.objectId == other.objectId) or in PyProtocols notation: ! (ITopicMapObject(other, False) and self.objectId == other.objectId) """ *************** *** 236,248 **** topic objects to define a scope or parameter property. """ - # def getScope(self): - # """ - # Returns the topics which define the scope/parameters - # - # The return value may be an empty Set, but is never C{None}. - # - # @rtype: ImmutableSet - # @return: An ImmutableSet of L{Topic} objects - # """ def addScopingTopic(topic): --- 198,201 ---- *************** *** 305,325 **** specification. """ - # def getReference(self): - # """ - # Returns the reference string portion of the locator. - # - # @rtype: string - # @return: The address string - # """ - # raise NotImplementedError('This method must be implemented!') - # - # def getNotation(self): - # """ - # Returns the notation string of the locator. - # - # @rtype: string - # @return: The notation string - # """ - # raise NotImplementedError('This method must be implemented!') def __eq__(other): --- 258,261 ---- *************** *** 339,343 **** and self.notation == other.notation) or in PyProtocols notation: ! (ILocator(other, None) and self.reference == other.reference and self.notation == other.notation) --- 275,279 ---- and self.notation == other.notation) or in PyProtocols notation: ! (ILocator(other, False) and self.reference == other.reference and self.notation == other.notation) *************** *** 406,419 **** TMDM 5.3.6 Topic items - Properties """ - # def getTopicNames(self): - # """ - # Returns the topic names defined for this topic. - # - # Returns an unmodifiable Set of L{TopicName} objects - # - # @rtype: ImmutableSet - # @return: An ImmutableSet of L{TopicName} objects - # """ - # raise NotImplementedError('This method must be implemented!') def createTopicName(value, typeOrScope, scope=None): --- 342,345 ---- *************** *** 478,502 **** """ - # def getOccurrences(self): - # """ - # Returns the occurrences defined for this topic. - # - # The return value may be an empty Set, but is never C{None}. - # - # @rtype: ImmutableSet - # @return: An ImmutableSet of L{Occurrence} objects. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getSubjectLocators(self): - # """ - # Returns the address of the subject-constituting resource of this topic. - # - # @rtype: L{Locator} - # @return: A L{Locator} object or C{None} if no subject-constituting - # resource is defined for this Topic. - # """ - # raise NotImplementedError('This method must be implemented!') - def addSubjectLocator(subjectLocator): """ --- 404,407 ---- *************** *** 525,536 **** """ - # def getSubjectIdentifiers(self): - # """ - # Returns the addresses of the subject-indicating resources of this topic. - # - # @rtype: ImmutableSet - # @return: An ImmutableSet of L{Locator} objects. - # """ - # raise NotImplementedError('This method must be implemented!') def addSubjectIdentifier(subjectIdentifier): --- 430,433 ---- *************** *** 556,567 **** raise NotImplementedError('This method must be implemented!') - # def getTypes(self): - # """ - # Returns the topics which define the types of this topic. - # - # @rtype: ImmutableSet - # @return: An ImmutableSet of L{Topic} objects - # """ - # raise NotImplementedError('This method must be implemented!') def addType(topic): --- 453,456 ---- *************** *** 581,593 **** """ - # def getRolesPlayed(self): - # """ - # Returns the association roles in which this Topic is a player. - # - # @rtype: ImmutableSet - # @return: ImmutableSet of L{AssociationRole} objects (may be empty, but never C{None} - # """ - # raise NotImplementedError('This method must be implemented!') - def remove(self): """ --- 470,473 ---- *************** *** 624,637 **** """ - # def getReified(self): - # """" - # Returns a tuple of L{TopicMapObject}s which are subject to this topic. - # - # The returned Set may be empty but never C{None} - # - # @rtype: ImmutableSet - # @return: L{TopicMapObject} instances which are subject of this topic - # """ - # raise NotImplementedError('This method must be implemented!') def addSourceLocator(sourceLocator): --- 504,507 ---- *************** *** 735,768 **** TMDM 5.2 The topic map item """ - # def getTopicMapSystem(self): - # """ - # Returns the TopicMapSystem to which this topic map belongs. - # - # @rtype: L{TopicMapSystem} - # @return: The TopicMapSystem object which manages this TopicMap. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getBaseLocator(self): - # """ - # Returns the base locator of this topic map. - # - # This locator is used as the unique identifier for the TopicMap within the - # TopicMap system. It is also used for resolving references - # to resources external to the TopicMap during parsing. - # - # @rtype: L{Locator} - # @return: Locator instance - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getAssociations(self): - # """ - # Returns all of the associations in the topic map. - # - # @rtype: ImmutableSet - # @return: An ImmutableSet of L{Association} objects. - # """ - # raise NotImplementedError('This method must be implemented!') def createAssociation(): --- 605,608 ---- *************** *** 777,789 **** """ - # def getTopics(self): - # """ - # Returns all of the topics in the topic map. - # - # @rtype: ImmutableSet - # @return: An ImmutableSet of L{Topic} objects. - # """ - # raise NotImplementedError('This method must be implemented!') - def createTopic(): """ --- 617,620 ---- *************** *** 819,831 **** """ - # def getReifier(self): - # """ - # Returns the Topic that reifies this topic map. - # - # @rtype: L{Topic} - # @return: A Topic instance or C{None} if the topic map is not reified. - # """ - # raise NotImplementedError('This method must be implemented!') - def remove(): """ --- 650,653 ---- *************** *** 1015,1039 **** TMDM 5.7 Association items """ - # def setType(self, type): - # """ - # Sets the topic which defines the type of the association. - # - # Replaces any existing type. - # - # @type type: L{Topic} - # @param type: The topic specifying the new type of the association, - # or C{None} to set the association to be untyped. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getType(self): - # """ - # Returns the topic which defines the type of the association. - # - # @rtype: L{Topic} - # @return: The Topic object which defines the type of the association, - # or C{None} if the association is untyped. - # """ - # raise NotImplementedError('This method must be implemented!') def createAssociationRole(player, type_): --- 837,840 ---- *************** *** 1053,1075 **** """ - # def getAssociationRoles(self): - # """ - # Returns the L{AssociationRole} objects representing all of the roles - # in this association. - # - # @rtype: ImmutableSet - # @return: An ImmutableSet of L{Association} objects. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getReifier(self): - # """ - # Returns the Topic that reifies this association. - # - # @rtype: L{Topic} - # @return: A L{Topic} instance or C{None} if the association is not reified. - # """ - # raise NotImplementedError('This method must be implemented!') - def remove(): """ --- 854,857 ---- *************** *** 1117,1180 **** TMDM 5.8 Association role items """ - # def getAssociation(self): - # """ - # Returns the L{Association} to which this Member belongs. - # - # @rtype: L{Association} - # @return: Association object - # """ - # raise NotImplementedError('This method must be implemented!') - - # def setPlayer(self, player): - # """ - # Sets the player of this association role. C{player} - # overwrites any previous value. - # - # @type player: L{Topic} - # @param player: The L{Topic} which plays this role in the association, - # or C{None} if no L{Topic} plays this role. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getPlayer(self): - # """ - # Returns the player of this association role. - # - # @rtype: L{Topic} - # @return: The L{Topic} which plays this role in the association, or C{None} - # if there is no role player. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getType(self): - # """ - # Returns the topic which defines the nature of this AssociationRole - # - # @rtype: L{Topic} - # @return: The L{Topic} object which defines the nature of this association - # role, or C{None} if there is no role-defining topic. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def setType(self, type): - # """ - # Sets the topic which defines the nature of this association role. - # - # Overwrites any existing role specification. - # - # @type type: L{Topic} - # @param type: The L{Topic} which defines the nature of this association, - # or C{None} to remove any existing role-defining topic. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getReifier(self): - # """ - # Returns the Topic that reifies this association role. - # - # @rtype: L{Topic} - # @return: A Topic instance or C{None} if the association role is not reified. - # """ - # raise NotImplementedError('This method must be implemented!') def remove(): --- 899,902 ---- *************** *** 1235,1321 **** TMDM 5.6 Occurrence items """ - # def getTopic(self): - # """ - # Returns the topic to which this occurrence belongs. - # - # @rtype: L{Topic} - # @return: The Topic object which contains this Occurrence. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def setType(self, type): - # """ - # Sets the topic which defines the type of this occurrence. - # - # Overwrites any existing type information. - # - # @type type: L{Topic} - # @param type: The Topic which defines the type of this Occurrence, - # or C{None} to remove any existing type. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getType(self): - # """ - # Returns the topic which defines the type of this occurrence. - # - # @rtype: L{Topic} - # @return: The Topic object which defines the type of this - # Occurrence, or C{None} if there is no occurrence type. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getValue(self): - # """ - # Returns the data string associated with this occurrence. - # - # @rtype: string - # @return: The resource data string of this occurrence, or C{None} - # if the occurrence does not have a resource data string. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def setValue(self, value): - # """ - # Sets the resource data string for this occurrence. - # - # This method will overwrite any existing resource data - # string and will replace any existing resource reference. - # - # @type value: string - # @param value: The resource data string - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getResource(self): - # """ - # Returns the resource reference address associated with this occurrence. - # - # @rtype: L{Locator} - # @return: The Locator object for the resource reference, or C{None} - # if this occurrence does not have a resource reference. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def setResource(self, loc): - # """ - # Sets the resource reference for this occurrence. - # - # This method will overwrite any existing resource reference and - # will set the value of the value property to C{null}. - # - # @type loc: L{Locator} - # @param loc: The resource reference - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getReifier(self): - # """ - # Returns the Topic that reifies this occurrence. - # - # @rtype: L{Topic} - # @return: A Topic instance or C{None} if the occurrence is not reified. - # """ - # raise NotImplementedError('This method must be implemented!')('This method must be implemented!') def remove(): --- 957,960 ---- *************** *** 1380,1427 **** TMDM 5.4 Topic name items """ - # def getTopic(self): - # """ - # Returns the L{Topic} which contains this topic name. - # - # @rtype: L{Topic} - # @return: The L{Topic} instance where this TopicName belongs to - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getValue(self): - # """ - # Returns the value of this TopicName - # - # @rtype: string - # @return: The value string or C{None} if this TopicName has no name string. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def setValue(self, value): - # """ - # Define the name string for this TopicName. - # - # A new value will replace any existing value. - # A C{None} value indicates that there is no name string for this TopicName. - # - # @type value: string - # @param value: The string value to be assigned to this TopicName - # - # @raise MergeException: If the processor detects that a merge is required - # and either automerge is disabled or automerge is enabled but the merge - # cannot be completed for some other reason. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getVariants(self): - # """ - # Returns the variants defined for this TopicName. - # - # The returned Set may be empty, but never C{None} - # - # @rtype: ImmutableSet - # @return: An ImmutableSet of L{Variant} objects. - # """ - # raise NotImplementedError('This method must be implemented!') def createVariant(valueOrResource, scope): --- 1019,1022 ---- *************** *** 1443,1491 **** """ - # def getReifier(self): - # """ - # Returns the Topic that reifies this topic name. - # - # @rtype: L{Topic} - # @return: A L{Topic} instance or C{None} if the topic name is not reified - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getType(self): - # """ - # Returns the L{Topic} that defines the type of this base name. - # - # @attention: Optional! This method reflects the XTM 1.1 model. - # A processor which does not implement support for XTM 1.1 - # MUST return C{None}. - # - # @rtype: L{Topic} - # @return: A L{Topic} instance or C{None} if the topic name does not - # have a type specified. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def setType(self, type): - # """ - # Sets the topic which defines the type of the TopicName. - # - # Replaces any existing type. - # - # @attention: Optional! This method reflects the XTM 1.1 model. - # A processor which does not implement support for XTM 1.1 - # MUST throw an C{UnsupportedOperationException}. - # - # @type type: L{Topic} - # @param type: The topic specifying the new type of the association, - # or C{None} to set the association to be untyped - # - # @raise UnsupportedOperationException: If the processor - # does not support the XTM 1.1 model. - # @raise MergeException: If the processor detects that a merge is required - # and either automerge is disabled or automerge is enabled but - # the merge cannot be completed for some other reason. - # """ - # raise NotImplementedError('This method must be implemented!') - def remove(self): """ --- 1038,1041 ---- *************** *** 1593,1657 **** TMDM 5.5 Variant items """ - # def getTopicName(self): - # """ - # Returns the topic name to which this variant belongs. - # - # @rtype: L{TopicName} - # @return: The L{TopicName} object where this Variant belongs to - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getValue(self): - # """ - # Returns the data string associated with this variant. - # - # @rtype: string - # @return: The resource data string of this Variant, or C{None} - # if the variant does not have a resource data string. - # """ - # raise NotImplementedError('This method must be implemented!') - - # def setValue(self, value): - # """ - # Sets the resource data string for this variant. - # - # This method will overwrite any existing resource data - # string and will replace any existing resource reference. - # - # @type value: string - # @param value: string value - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getResource(self): - # """ - # Returns the resource reference address associated with this variant. - # - # @rtype: L{Locator} - # @return: The Locator object for the resource reference, or C{None} - # if this variant does not have a resource reference - # """ - # raise NotImplementedError('This method must be implemented!') - - # def setResource(self, loc): - # """ - # Sets the resource reference for this variant. - # - # This method will overwrite any existing - # resource reference and will replace any existing resource data. - # - # @type loc: L{Locator} - # @param loc: A L{Locator} object which represents the resource reference - # """ - # raise NotImplementedError('This method must be implemented!') - - # def getReifier(self): - # """ - # Returns the L{Topic} that reifies this variant name. - # - # @rtype: L{Topic} - # @return: A Topic instance or C{None} if the variant name is not reified. - # """ - # raise NotImplementedError('This method must be implemented!') def remove(self): --- 1143,1146 ---- *************** *** 1764,1779 **** """ - # def getBaseLocators(self): - # """ - # Returns the base locators of the topic maps managed by the system. - # - # The return value may be an empty Set if no TopicMaps are loaded - # in the TopicMapSystem, but must never be <code>None</code>. - # - # @rtype: ImmutableSet - # @return: An unmodifiable Set of base locator objects - # """ - # raise NotImplementedError('This method must be implemented!') - def close(): """ --- 1253,1256 ---- |