Skip to content

Commit 508f534

Browse files
author
Tobias Wiessner
committed
gitignore
1 parent fbc2900 commit 508f534

16 files changed

Lines changed: 883 additions & 94 deletions

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Build
2+
out
3+
4+
# Intellij
5+
.idea
6+
*.iml
7+
8+
# Compiled class file
9+
*.class
10+
11+
# Log file
12+
*.log
13+
14+
# BlueJ files
15+
*.ctxt
16+
17+
# Mobile Tools for Java (J2ME)
18+
.mtj.tmp/
19+
20+
# Package Files #
21+
*.jar
22+
*.war
23+
*.nar
24+
*.ear
25+
*.zip
26+
*.tar.gz
27+
*.rar
28+
29+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
30+
hs_err_pid*
31+
replay_pid*

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

Main.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import de.uni_stuttgart.ils.reqif4j.reqif.ReqIF;
2+
import de.uni_stuttgart.ils.reqif4j.reqif.ReqIFCoreContent;
3+
import de.uni_stuttgart.ils.reqif4j.reqif.ReqIFDocument;
4+
import de.uni_stuttgart.ils.reqif4j.reqif.ReqIFz;
5+
6+
import java.io.FileNotFoundException;
7+
import java.io.IOException;
8+
9+
public class Main {
10+
public static void main(String[] args){
11+
ReqIFz reqIFz;
12+
try {
13+
reqIFz = new ReqIFz("");
14+
} catch (IOException e) {
15+
throw new RuntimeException(e);
16+
}
17+
String name = reqIFz.getName();
18+
ReqIFDocument reqIFDocument = reqIFz.getReqIFDocuments().get("Requirements.reqif");
19+
ReqIFCoreContent reqIFCoreContent = reqIFDocument.getCoreContent();
20+
//reqIFCoreContent.getSpecObjects()
21+
}
22+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Java classes to access Specifications & Requirements stored in the Requireme
33

44
This implementation of the Requirements Interchange Format currently uses http://www.lingala.net/zip4j/ for access to .reqifz files.
55

6-
TODO: Change to java.util.zip
6+
Fixed old library dependencies.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package de.uni_stuttgart.ils.reqif4j.attributes;
2+
3+
import de.uni_stuttgart.ils.reqif4j.datatypes.Datatype;
4+
import org.w3c.dom.Node;
5+
6+
import java.util.Map;
7+
8+
public class AttributeDefinitionDate extends AttributeDefinition{
9+
10+
public AttributeDefinitionDate(Node attributeDefinition, Map<String, Datatype> dataTypes) {
11+
super(attributeDefinition, dataTypes);
12+
}
13+
}

de/uni_stuttgart/ils/reqif4j/attributes/AttributeValueBoolean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class AttributeValueBoolean extends AttributeValue {
66
public AttributeValueBoolean(String value, AttributeDefinition type) {
77
super(value, type);
88

9-
if(value.toLowerCase().equals("true")) {
9+
if(value != null && value.toLowerCase().equals("true")) {
1010
this.value = true;
1111
}else{
1212
this.value = false;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package de.uni_stuttgart.ils.reqif4j.attributes;
2+
3+
public class AttributeValueDate extends AttributeValue{
4+
public AttributeValueDate(String value, AttributeDefinition type) {
5+
super(value, type);
6+
7+
8+
}
9+
10+
@Override
11+
public Object getValue() {
12+
return (String)this.value;
13+
}
14+
}

de/uni_stuttgart/ils/reqif4j/attributes/AttributeValueXHTML.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ private AttributeValueXHTMLElementList deconstructXHTML(Node xhtmlContent) {
3737

3838
AttributeValueXHTMLElementList xhtmlElementList = new AttributeValueXHTMLElementList();
3939

40-
Node div = ((Element)xhtmlContent).getElementsByTagName("xhtml:div").item(0);
40+
Node div = ((Element)xhtmlContent).getElementsByTagName(XHTML.DIV).item(0);
4141

4242
for(int e=0; e < div.getChildNodes().getLength(); e++) {
4343
Node xhtmlElement = div.getChildNodes().item(e);
4444
String elementName = div.getChildNodes().item(e).getNodeName();
45-
if(elementName.contains("xhtml:")) {
45+
xhtmlElementList.add(elementName, decostructXHTMLElement(elementName, xhtmlElement));
46+
/*if(elementName.contains("xhtml:")) {
4647
if(elementName.endsWith("p")) {
4748
xhtmlElementList.add("P",decostructXHTMLElement("P", xhtmlElement));
4849
}else if(elementName.endsWith("table")) {
@@ -54,7 +55,7 @@ private AttributeValueXHTMLElementList deconstructXHTML(Node xhtmlContent) {
5455
}else if(elementName.contains("object")) {
5556
xhtmlElementList.add("OBJ",decostructXHTMLElement("OBJ", xhtmlElement));
5657
}
57-
}
58+
}*/
5859
}
5960
return xhtmlElementList;
6061
}

de/uni_stuttgart/ils/reqif4j/attributes/XHTML.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22

33
public class XHTML {
44

5-
public static final String DIV = "xhtml:div";
5+
public static final String DIV = "div";
66

77
// beginsWith
8-
public static final String BR = "xhtml:br";
9-
public static final String H = "xhtml:h";
8+
public static final String BR = "br";
9+
public static final String H = "h";
1010

1111
// equals
12-
public static final String LI = "xhtml:li";
13-
public static final String OBJECT = "xhtml:object";
14-
public static final String P = "xhtml:p";
15-
public static final String SPAN = "xhtml:span";
16-
public static final String TBODY = "xhtml:tbody";
17-
public static final String TBL = "xhtml:table";
18-
public static final String TEXT = "xhtml:text";
19-
public static final String TD = "xhtml:td";
20-
public static final String TH = "xhtml:th";
21-
public static final String THEAD = "xhtml:thead";
22-
public static final String TR = "xhtml:tr";
23-
public static final String UL = "xhtml:ul";
24-
public static final String VAR = "xhtml:var";
12+
public static final String LI = "li";
13+
public static final String OBJECT = "object";
14+
public static final String P = "p";
15+
public static final String SPAN = "span";
16+
public static final String TBODY = "tbody";
17+
public static final String TBL = "table";
18+
public static final String TEXT = "text";
19+
public static final String TD = "td";
20+
public static final String TH = "th";
21+
public static final String THEAD = "thead";
22+
public static final String TR = "tr";
23+
public static final String UL = "ul";
24+
public static final String VAR = "var";
2525

2626
//#text
2727
public static final String _TEXT = "#text";
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package de.uni_stuttgart.ils.reqif4j.datatypes;
2+
3+
import de.uni_stuttgart.ils.reqif4j.reqif.ReqIFConst;
4+
5+
import javax.xml.crypto.Data;
6+
7+
public class DatatypeDate extends Datatype {
8+
public DatatypeDate(String id, String name) {
9+
super(id, name, ReqIFConst.DATE);
10+
}
11+
}

0 commit comments

Comments
 (0)