This file is indexed.

/usr/include/GNUstep/NGObjWeb/WOxElemBuilder.h is in libsope-dev 2.2.17-1build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/*
  Copyright (C) 2000-2005 SKYRIX Software AG

  This file is part of SOPE.

  SOPE is free software; you can redistribute it and/or modify it under
  the terms of the GNU Lesser General Public License as published by the
  Free Software Foundation; either version 2, or (at your option) any
  later version.

  SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with SOPE; see the file COPYING.  If not, write to the
  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  02111-1307, USA.
*/

#ifndef __WOxElemBuilder_H__
#define __WOxElemBuilder_H__

#import <Foundation/NSObject.h>
#include <DOM/DOMProtocols.h>

@class NSString, NSArray, NSMutableDictionary, NSMutableArray;
@class WOElement, WOAssociation, WOComponent, WOResourceManager;
@class WOComponentScript, WOComponentScriptPart;

/*
  Abstract class to build NGObjWeb WOElement templates from
  XML DOM structures.
  
  Template builders can be stacked in a processing queue, so that
  unknown elements are produced by the "nextBuilder". When processing
  is done using a stack, the first stack builder is called the
  "templateBuilder" and used to keep global state (eg the template
  builder must be used to create further elements if the same element
  set is required).
  
  WOxElemBuilder stacks are not thread-safe since the template builder
  stores subcomponent creation info in an instance variable.
*/

@interface WOxElemBuilder : NSObject
{
@protected
  WOxElemBuilder      *nextBuilder;
  NSMutableArray      *subcomponentInfos;
  NSMutableDictionary *nsToAssoc;
  NSMutableArray      *scriptParts;
  WOComponentScript   *script;
}

+ (WOxElemBuilder *)createBuilderQueue:(NSArray *)_classNames;
+ (WOxElemBuilder *)createBuilderQueueV:(NSString *)_className, ...;

/* building a template from a DOM structure */

- (WOElement *)buildTemplateFromDocument:(id<DOMDocument>)_document;

/* node-type build dispatcher method ... */

- (WOElement *)buildNode:(id<DOMNode>)_node templateBuilder:(id)_bld;
- (NSArray *)buildNodes:(id<DOMNodeList>)_node templateBuilder:(id)_bld;

/* building parts of a DOM ... */

- (WOElement *)buildDocument:(id<DOMDocument>)_node templateBuilder:(id)_bld;
- (WOElement *)buildElement:(id<DOMElement>)_node   templateBuilder:(id)_bld;

- (WOElement *)buildCharacterData:(id<DOMCharacterData>)_node
  templateBuilder:(id)_builder;
- (WOElement *)buildText:(id<DOMText>)_node
  templateBuilder:(id)_builder;
- (WOElement *)buildCDATASection:(id<DOMCDATASection>)_node
  templateBuilder:(id)_builder;
- (WOElement *)buildComment:(id<DOMComment>)_node
  templateBuilder:(id)_builder;

/* association callbacks */

- (WOAssociation *)associationForValue:(id)_value;
- (WOAssociation *)associationForKeyPath:(NSString *)_path;
- (WOAssociation *)associationForJavaScript:(NSString *)_js;

// this one uses the attribute namespace to determine the association class
- (WOAssociation *)associationForAttribute:(id<DOMAttr>)_attribute;
// map the attribute names to dict keys and use the method above for the value
// "_name" attributes are mapped to "?name" query keys
- (NSMutableDictionary *)associationsForAttributes:(id<DOMNamedNodeMap>)_attrs;

- (void)registerAssociationClass:(Class)_class forNamespaceURI:(NSString *)_ns;
- (Class)associationClassForNamespaceURI:(NSString *)_ns;

/* creating unique IDs */

- (NSString *)uniqueIDForNode:(id)_node;
  
/* logging */

#if 0
- (void)logWithFormat:(NSString *)_format, ...;
- (void)debugWithFormat:(NSString *)_format, ...;
#endif

/* managing builder queues */

- (void)setNextBuilder:(WOxElemBuilder *)_builder;
- (WOxElemBuilder *)nextBuilder;

/* component script parts */

- (WOComponentScript *)componentScript;
- (void)addComponentScriptPart:(WOComponentScriptPart *)_part;
- (void)addComponentScript:(NSString *)_script line:(unsigned)_line;

/* subcomponent registry, created during parsing ... */

- (void)registerSubComponentWithId:(NSString *)_cid
  componentName:(NSString *)_name
  bindings:(NSMutableDictionary *)_bindings;

- (NSArray *)subcomponentInfos;

- (void)reset;

/* support methods for subclasses */

- (id<DOMElement>)lookupUniqueTag:(NSString *)_name
  inElement:(id<DOMElement>)_elem;

- (WOElement *)elementForRawString:(NSString *)_rawstr;
- (WOElement *)elementForElementsAndStrings:(NSArray *)_elements;

- (WOElement *)wrapElement:(WOElement *)_element 
  inCondition:(WOAssociation *)_condition
  negate:(BOOL)_flag;

- (WOElement *)wrapElements:(NSArray *)_sub inElementOfClass:(Class)_class;

- (WOElement *)wrapChildrenOfElement:(id<DOMElement>)_tag
  inElementOfClass:(Class)_class
  templateBuilder:(id)_b;

@end


@interface WOxElemBuilderComponentInfo : NSObject
{
  NSString            *cid;
  NSString            *pageName;
  NSMutableDictionary *bindings;
}

- (id)initWithComponentId:(NSString *)_cid
  componentName:(NSString *)_name
  bindings:(NSMutableDictionary *)_bindings;

/* accessors */

- (NSString *)componentId;
- (NSString *)pageName;
- (NSMutableDictionary *)bindings;

/* create the component ... */

- (id)instantiateWithResourceManager:(WOResourceManager *)_rm
  languages:(NSArray *)_languages;

@end

/*
  Specialized superclass for builders which directly map DOM elements
  to NGObjWeb dynamic elements (which is usually the case ...).

  The classes returned must conform to the WOxTagClassInit protocol and
  can use the _builder argument to continue building for child nodes
  of the given DOM element.
*/

@interface NSObject(WOxTagClassInit)

- (id)initWithElement:(id<DOMElement>)_element
  templateBuilder:(WOxElemBuilder *)_builder;

@end

@interface WOxTagClassElemBuilder : WOxElemBuilder

- (WOElement *)buildNextElement:(id<DOMElement>)_elem templateBuilder:(id)_b;
- (Class)classForElement:(id<DOMElement>)_element;

@end

#endif /* WOxElemBuilder */