4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor Class Reference

Class which parses and process XML with messages with types for protocol version 2. More...

Collaboration diagram for cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor:
Collaboration graph

Public Member Functions

 P2AnnotTypeProcessor ()
 
void procesTypesAdd (Element typesElement, RequestInfo requestInfo)
 
void procesTypesRemove (Element typesElement, RequestInfo requestInfo)
 
void procesTypesChange (Element typesElement, RequestInfo requestInfo)
 
void procesTypeQuery (Element typesQueryElement, RequestInfo requestInfo)
 

Static Public Member Functions

static AnnotType searchAnnotType (String uri, ArrayList< AnnotType > typesFromFlier)
 

Package Functions

AnnotType findTypeByUri (ArrayList< AnnotType > types, String uri)
 
void deleteTypeByUri (ArrayList< AnnotType > types, String uri)
 

Private Member Functions

void procesAnnotTypes (Element typesElement, RequestInfo requestInfo, boolean update)
 
void procesAnnotType (Element typeElement, RequestInfo requestInfo, boolean update)
 
AnnotType getAncestor (String name, String typeUri, String uri)
 
String processAncestors (String name, String uri, Element ancestorEl)
 
AnnotTypeAttr processTypeAttribute (Element attributeEl, AnnotType annotType)
 
void procesDeleteTypes (Element typeElement, RequestInfo requestInfo)
 
void procesDeleteAnnotType (Element typeElement, RequestInfo requestInfo)
 
boolean containsAttrName (AnnotType annotType, String name)
 
void setMissingAncestors (ArrayList< AnnotType > types, RequestInfo requestInfo)
 
void setMissingDirectAncestors (ArrayList< AnnotType > types, RequestInfo requestInfo)
 
void checkAncestors (ArrayList< AnnotType > types, RequestInfo requestInfo)
 

Private Attributes

RequestInfo requestInfo
 
ArrayList< Pair< String,
AnnotType > > 
ancestorPair
 
ArrayList< Pair< String,
AnnotType > > 
direcAncestorPair
 

Detailed Description

Class which parses and process XML with messages with types for protocol version 2.

Class which parses and process XML with messages with types for protocol version 2.

Author
Martin Petr (xpetrm05)

Definition at line 46 of file P2AnnotTypeProcessor.java.

Constructor & Destructor Documentation

cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.P2AnnotTypeProcessor ( )

Constructor

Definition at line 57 of file P2AnnotTypeProcessor.java.

Member Function Documentation

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.checkAncestors ( ArrayList< AnnotType types,
RequestInfo  requestInfo 
)
private

Consistency check for primary ancestor and list of ancestors

Parameters
typesList with types to check
requestInfoInformations about client request

Definition at line 1051 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.containsAttrName ( AnnotType  annotType,
String  name 
)
private

Method check if annotation type have attribute with specific name.

Parameters
annotTypetype in which method will seek
namename of attribute which method will seek
Returns
true if corresponding attribute is found

Definition at line 920 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.deleteTypeByUri ( ArrayList< AnnotType types,
String  uri 
)
package

Removes type with given URI from list

Parameters
typesList of types
uriURI of type which should be removed from the list

Definition at line 1034 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

AnnotType cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.findTypeByUri ( ArrayList< AnnotType types,
String  uri 
)
package

Find type of annotation in the list

Parameters
typesList of types of annotation
uriUri of type of annotation which should be found
Returns
If it was found returns given type, null otherwise

Definition at line 1017 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

AnnotType cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.getAncestor ( String  name,
String  typeUri,
String  uri 
)
private

Method gets ancestor of annotation type from DB.

Parameters
namename of type for which we are searching ancestor
typeUriuri of type for which we are searching ancestor
uriuri of ancestor of annotation type
Returns
annotation type object from DB or null if not found

Definition at line 526 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.procesAnnotType ( Element  typeElement,
RequestInfo  requestInfo,
boolean  update 
)
private

Method process element with type for add or update.

Parameters
typeElementelement with type for add or update
requestInfoinformations about client request
updateif true proces type for update if is false process types for add

Definition at line 155 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.procesAnnotTypes ( Element  typesElement,
RequestInfo  requestInfo,
boolean  update 
)
private

Method process element with types for add or update.

Parameters
typesElementelement with types for add or update
requestInfoinformations about client request
updateif true proces types for update if is false process types for add

Definition at line 122 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.procesDeleteAnnotType ( Element  typeElement,
RequestInfo  requestInfo 
)
private

Method process element with annotation type to delete.

Parameters
typeElementelement with annotation type to delete
requestInfoinformations about client request

Definition at line 841 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.procesDeleteTypes ( Element  typeElement,
RequestInfo  requestInfo 
)
private

Method process element with annotation types to delete.

Parameters
typeElementelement with annotation types to delete
requestInfoinformations about client request

Definition at line 826 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.processAncestors ( String  name,
String  uri,
Element  ancestorEl 
)
private

Method process element with ancestor of annotation type.

Parameters
nameName of type of annotation to which ancestors should be assigned
uriURI of type of annotation to which ancestors should be assigned
ancestorElelement with type for add or update
Returns
uri of ancestor of annotation type

Definition at line 576 of file P2AnnotTypeProcessor.java.

Here is the caller graph for this function:

AnnotTypeAttr cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.processTypeAttribute ( Element  attributeEl,
AnnotType  annotType 
)
private

Method process element with attribute of annotation type.

Parameters
attributeElelement with attribute of annotation type
annotTypeType of annotation to which this attribute belongs
Returns
attribute of annotation type

Definition at line 601 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.procesTypeQuery ( Element  typesQueryElement,
RequestInfo  requestInfo 
)

Entry method for processing types guery.

Parameters
typesQueryElementelement with types guery
requestInfoinformations about client request

Definition at line 101 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.procesTypesAdd ( Element  typesElement,
RequestInfo  requestInfo 
)

Entry method for processing types for add.

Parameters
typesElementelement with types for add
requestInfoinformations about client request

Definition at line 68 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.procesTypesChange ( Element  typesElement,
RequestInfo  requestInfo 
)

Entry method for processing types for change.

Parameters
typesElementelement with types for change
requestInfoinformations about client request

Definition at line 90 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.procesTypesRemove ( Element  typesElement,
RequestInfo  requestInfo 
)

Entry method for processing types for remove.

Parameters
typesElementelement with types for remove
requestInfoinformations about client request

Definition at line 79 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

static AnnotType cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.searchAnnotType ( String  uri,
ArrayList< AnnotType typesFromFlier 
)
static

Search for type in DB and currently added types which are stored in flier

Parameters
uriUri of annotation type
typesFromFlierArrayList of annotation types, which have been recently added
Returns

Definition at line 1089 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.setMissingAncestors ( ArrayList< AnnotType types,
RequestInfo  requestInfo 
)
private

The method finds the ancestors of a new types which don't have the ancestors yet (they are in the same request probably). This covers only the types which had the ancestors filled out in the serialized form.

Parameters
typesall new types
requestInfoinformations about client request

Definition at line 941 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.setMissingDirectAncestors ( ArrayList< AnnotType types,
RequestInfo  requestInfo 
)
private

The method finds the direct ancestor of a new types which don't have the direct ancestors yet (they are in the same request probably). This covers only the types which had the ancestors filled out in the serialized form.

Parameters
typesall new types
requestInfoinformations about client request

Definition at line 979 of file P2AnnotTypeProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

ArrayList<Pair<String,AnnotType> > cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.ancestorPair
private

List of new annotations without founded ancestors

Definition at line 50 of file P2AnnotTypeProcessor.java.

ArrayList<Pair<String,AnnotType> > cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.direcAncestorPair
private

List of new annotations without founded direct ancestors

Definition at line 52 of file P2AnnotTypeProcessor.java.

RequestInfo cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotTypeProcessor.requestInfo
private

Informations about client request

Definition at line 48 of file P2AnnotTypeProcessor.java.


The documentation for this class was generated from the following file: