GeoPubby  Version 0.1.0.0
Condition Class Reference
Collaboration diagram for Condition:

Public Member Functions

String toSHACL ()
 
String toString ()
 

Package Attributes

String property
 
String value
 
String operator
 

Member Function Documentation

◆ toSHACL()

String toSHACL ( )
11  {
12  StringBuilder builder=new StringBuilder();
13  builder.append("sh:condition ["+System.lineSeparator()+" sh:property ["+System.lineSeparator()+" sh:path "+property+";"+System.lineSeparator()+"");
14  switch(operator) {
15  case "PropertyIsEqualTo":
16  if(value.startsWith("http")) {
17  builder.append("sh:equals "+value+";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
18  }else {
19  builder.append("sh:pattern \"^"+value+"$\";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
20  }
21  return builder.toString();
22  case "PropertyIsNotEqualTo":
23  if(value.startsWith("http")) {
24  builder.append("sh:disjoint "+value+";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
25  }else {
26  builder.append("sh:disjoint \""+value+"\";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
27  }
28  return builder.toString();
29  case "PropertyIsLessThan":
30  if(value.startsWith("http")) {
31  builder.append("sh:lessThan "+value+";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
32  }else {
33  builder.append("sh:maxExclusive \""+value+"\";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
34  }
35  return builder.toString();
36  case "PropertyIsLessThanOrEqualTo":
37  if(value.startsWith("http")) {
38  builder.append("sh:lessThanOrEquals "+value+";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
39  }else {
40  builder.append("sh:maxInclusive \""+value+"\";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
41  }
42  return builder.toString();
43  case "PropertyIsGreaterThan":
44  if(value.startsWith("http")) {
45  builder.append("sh:minExclusive \""+value+"\";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
46  }
47  return builder.toString();
48  case "PropertyIsGreaterThanOrEqualTo":
49  if(value.startsWith("http")) {
50  builder.append("sh:minInclusive \""+value+"\";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
51  }
52  return builder.toString();
53  case "PropertyIsLike":
54  if(value.startsWith("http")) {
55  builder.append("sh:pattern \""+value+"\";"+System.lineSeparator()+"];"+System.lineSeparator()+"];"+System.lineSeparator());
56  }
57  return builder.toString();
58  case "PropertyIsNull":
59  //Exists Query
60  return builder.toString();
61  case "PropertyIsBetween":
62  break;
63  case "Intersects":
64  break;
65  case "Equals":
66  break;
67  case "Disjoint":
68  break;
69  case "Touches":
70  break;
71  case "Within":
72  break;
73  case "Overlaps":
74  break;
75  case "Crosses":
76  break;
77  case "Contains":
78  break;
79  case "DWithin":
80  break;
81  case "Beyond":
82  break;
83  case "BBOX":
84  break;
85  }
86  return builder.toString();
87  }
String value
Definition: Condition.java:7
String property
Definition: Condition.java:5

References Condition.property, and Condition.value.

Referenced by SLDParser.endElement().

◆ toString()

String toString ( )
90  {
91  return "property: "+property+" condition: "+operator+" value: "+value;
92  }

References Condition.value.

Member Data Documentation

◆ operator

String operator
package

Referenced by SLDParser.startElement().

◆ property

String property
package

◆ value

String value
package