summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/resources/schema/docproc.rnc
blob: 42902f7180feee6109186548fd1cc97ca2fac148 (plain) (blame)
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
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
DocProc = element docproc {
    DocProcV3
}

SchemaMapping = element map {
  element field {
    attribute doctype { text }?,
    attribute in-document { text },
    attribute in-processor { text }
  }+
}




#Version 3 config:

DocProcV3 = attribute version { "3.0" },
   (ClusterV3* &
   OuterDocprocChainsV3? &
   GenericConfig*
)

# TODO Here we need a thorough cleaning
DocprocClusterAttributes =   attribute compressdocuments { xsd:boolean }? &
  attribute numnodesperclient { xsd:positiveInteger }? &
  attribute preferlocalnode { xsd:boolean }? &
  attribute maxmessagesinqueue { xsd:nonNegativeInteger }? &
  attribute maxqueuebytesize { xsd:string { minLength = "1" } }? &
  attribute maxqueuewait { xsd:positiveInteger }? &
  attribute maxconcurrentfactor { xsd:double { minExclusive = "0.0" maxExclusive = "1.0" } }? &
  attribute documentexpansionfactor { xsd:double { minExclusive = "0.0" } }? &
  attribute containercorememory { xsd:nonNegativeInteger }?

# TODO Here we need a thorough cleaning
ClusterV3 = element cluster {
  attribute name { xsd:NCName } &
  DocprocClusterAttributes? &

  element nodes {
    Resources? &
    attribute jvmargs { text }? &
    attribute preload { text }? &
    element node {
      GenericConfig* &
      service.attlist &
      attribute maxmessagesinqueue { xsd:nonNegativeInteger }? &
      attribute maxqueuebytesize { xsd:string { minLength = "1" } }? &
      attribute maxqueuewait { xsd:positiveInteger }?
    }+
  } &
  GenericConfig* &
  SchemaMapping? &
  Component* &
  Handler* &
  DocprocChainsV3?
}

DocprocChainsV3 =
    element docprocchains {
        DocumentProcessorV3* &
        DocprocChainV3* &
        GenericConfig*
   }

OuterDocprocChainsV3 =
    element docprocchains {
        DocumentProcessorV3* &
        DocprocChainV3*
   }

DocprocChainV3 =
    element docprocchain {
        DocprocChainV3Contents
    }

DocprocChainV3Contents = attribute name { xsd:NCName }? &
        ComponentId &
        SchemaMapping? &
        DocprocChainInheritance &
        attribute documentprocessors { text }? &
        DocumentProcessorV3* &
        Phase* &
        GenericConfig*


DocprocChainInheritance =
    attribute inherits { text }? &
    attribute excludes { text }? &
    element inherits {
        element docprocchain { ComponentSpec }* &
        element exclude { ComponentSpec }*
    }?

DocumentProcessorV3 =
    element documentprocessor {
        BundleSpec &
        SchemaMapping? &
        GenericSearcherOrDocumentProcessor
    }