00001 #include <arc/message/MessageAuth.h> 00002 00003 /* 00004 <?xml version="1.0" encoding="UTF-8"?> 00005 <xsd:schema 00006 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 00007 xmlns="http://www.nordugrid.org/schemas/InfoFilter/2008" 00008 xmlns:if="http://www.nordugrid.org/schemas/InfoFilter/2008" 00009 targetNamespace="http://www.nordugrid.org/schemas/InfoFilter/2008" 00010 elementFormDefault="qualified"> 00011 00012 <xsd:complexType name="InfoFilterDefinition_Type"> 00013 <!-- This element defines information document filtering definition. --> 00014 <xsd:sequence> 00015 <!-- Filter contains one authorization policy to by applied --> 00016 <xsd:any minOccurs="1" maxOccurs="1"/> 00017 </xsd:sequence> 00018 <!-- Attribute 'id' defines reference used by InfoFilterTag elements --> 00019 <xsd:attribute name="id" type="xsd:string" use="optional"/> 00020 </xsd:complexType> 00021 <xsd:element name="InfoFilterDefinition" type="if:InfoFilterDefinition_Type"/> 00022 00023 <!-- InfoFilterTag refers to Filter which has to be applied to current node --> 00024 <xsd:attribute name="InfoFilterTag"> 00025 <xsd:simpleType> 00026 <xsd:restriction base="xsd:string"/> 00027 </xsd:simpleType> 00028 </xsd:attribute> 00029 00030 </xsd:schema> 00031 */ 00032 00033 namespace Arc { 00034 00035 typedef std::list< std::pair<std::string,XMLNode> > InfoFilterPolicies; 00036 00038 00041 class InfoFilter { 00042 private: 00043 MessageAuth& id_; 00044 public: 00046 00048 InfoFilter(MessageAuth& id); 00050 00052 bool Filter(XMLNode doc) const; 00054 00059 bool Filter(XMLNode doc,const InfoFilterPolicies& policies,const NS& ns) const; 00060 }; 00061 00062 } // namespace Arc 00063