[MOBY-guts] biomoby commit
Eddie Kawas
kawas at pub.open-bio.org
Wed Sep 21 17:13:52 UTC 2005
kawas
Wed Sep 21 13:13:51 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources
In directory pub.open-bio.org:/tmp/cvs-serv12084/org/biomoby/client/ui/graphical/servlet/jresources
Modified Files:
RESOURCE.java
Log Message:
removed carriage returns and replaced \n with more portable java system calls.
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources RESOURCE.java,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java 2005/08/29 23:11:08 1.10
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java 2005/09/21 17:13:51 1.11
@@ -130,7 +130,7 @@
+ " contents='';"
+ " row=Math.max(0,index-7);"
+ " while(row<index)"
- + " contents += tl[row++] + '\\r\\n';"
+ + " contents += tl[row++] + '\\n';"
+ " document.forms[0].elements[0].value = contents + tl[index].substring(0,text_pos) + \"_\";"
+ " if(text_pos++==str_length) {"
+ " text_pos=0;"
@@ -991,15 +991,15 @@
private String getPredicates() {
StringBuffer buffer = new StringBuffer();
buffer.append(
- "<rdf:RDF\r\n" +
- " xmlns:moby=\"http://biomoby.org/RESOURCES/MOBY-S/Predicates#\"\r\n" +
- " xmlns:mobyObject=\"http://biomoby.org/RESOURCES/MOBY-S/Objects#\"\r\n" +
- " xmlns:serviceInstances=\"http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#\"\r\n" +
- " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\r\n" +
- " xmlns:xs=\"http://www.w3.org/2001/XMLSchema#\"\r\n" +
- " xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\"\r\n" +
- " xmlns:owl=\"http://www.w3.org/2002/07/owl#\"\r\n" +
- " xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\r\n");
+ "<rdf:RDF" + System.getProperty("line.separator") + "" +
+ " xmlns:moby=\"http://biomoby.org/RESOURCES/MOBY-S/Predicates#\"" + System.getProperty("line.separator") + "" +
+ " xmlns:mobyObject=\"http://biomoby.org/RESOURCES/MOBY-S/Objects#\"" + System.getProperty("line.separator") + "" +
+ " xmlns:serviceInstances=\"http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#\"" + System.getProperty("line.separator") + "" +
+ " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"" + System.getProperty("line.separator") + "" +
+ " xmlns:xs=\"http://www.w3.org/2001/XMLSchema#\"" + System.getProperty("line.separator") + "" +
+ " xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\"" + System.getProperty("line.separator") + "" +
+ " xmlns:owl=\"http://www.w3.org/2002/07/owl#\"" + System.getProperty("line.separator") + "" +
+ " xmlns:dc=\"http://purl.org/dc/elements/1.1/\">" + System.getProperty("line.separator") + "");
// add the predicates here
buffer.append(createOntologyBlock("http://biomoby.org/RESOURCES/MOBY-S/Predicates#",
"The BioMoby Predicates Vocabulary (moby)",
@@ -1163,7 +1163,7 @@
// end the addition of predicates here
buffer.append(
- "\r\n" +
+ "" + System.getProperty("line.separator") + "" +
"</rdf:RDF>");
return buffer.toString();
}
@@ -1171,56 +1171,56 @@
private String createPropertyBlock(String about, String definedBy,
String label, String comment, String domain, String range) {
String s =
- "\r\n<rdf:Property rdf:about=\"" + about + "\">\r\n" +
- " <rdfs:isDefinedBy rdf:resource=\"" + definedBy + "\"/>\r\n" +
- " <rdfs:label>" + label + "</rdfs:label>\r\n" +
- " <rdfs:comment>" + comment + "</rdfs:comment>\r\n" +
- " <rdfs:range rdf:resource=\"" + range + "\"/>\r\n" +
- " <rdfs:domain rdf:resource=\"" + domain + "\"/>\r\n" +
- "</rdf:Property>\r\n";
+ "" + System.getProperty("line.separator") + "<rdf:Property rdf:about=\"" + about + "\">" + System.getProperty("line.separator") + "" +
+ " <rdfs:isDefinedBy rdf:resource=\"" + definedBy + "\"/>" + System.getProperty("line.separator") + "" +
+ " <rdfs:label>" + label + "</rdfs:label>" + System.getProperty("line.separator") + "" +
+ " <rdfs:comment>" + comment + "</rdfs:comment>" + System.getProperty("line.separator") + "" +
+ " <rdfs:range rdf:resource=\"" + range + "\"/>" + System.getProperty("line.separator") + "" +
+ " <rdfs:domain rdf:resource=\"" + domain + "\"/>" + System.getProperty("line.separator") + "" +
+ "</rdf:Property>" + System.getProperty("line.separator") + "";
return s;
}
private String createClassBlock(String about, String definedBy,
String label, String comment, String subClassOf) {
String s =
- "\r\n<rdfs:Class rdf:about=\""+ about +"\">\r\n" +
- " <rdfs:isDefinedBy rdf:resource=\""+ definedBy +"\"/>\r\n" +
- " <rdfs:label>"+ label +"</rdfs:label>\r\n" +
- " <rdfs:comment>"+ comment +"</rdfs:comment>\r\n" +
- " <rdfs:subClassOf rdf:resource=\""+ subClassOf +"\"/>\r\n" +
- "</rdfs:Class>\r\n";
+ "" + System.getProperty("line.separator") + "<rdfs:Class rdf:about=\""+ about +"\">" + System.getProperty("line.separator") + "" +
+ " <rdfs:isDefinedBy rdf:resource=\""+ definedBy +"\"/>" + System.getProperty("line.separator") + "" +
+ " <rdfs:label>"+ label +"</rdfs:label>" + System.getProperty("line.separator") + "" +
+ " <rdfs:comment>"+ comment +"</rdfs:comment>" + System.getProperty("line.separator") + "" +
+ " <rdfs:subClassOf rdf:resource=\""+ subClassOf +"\"/>" + System.getProperty("line.separator") + "" +
+ "</rdfs:Class>" + System.getProperty("line.separator") + "";
return s;
}
private String createDescriptionBlock(String about, String[] seeAlsos) {
if (seeAlsos == null)
- return "\r\n<rdf:Description rdf:about=\""+ about +"\"/>";
+ return "" + System.getProperty("line.separator") + "<rdf:Description rdf:about=\""+ about +"\"/>";
StringBuffer sb = new StringBuffer();
- sb.append(" <rdf:Description rdf:about=\""+ about +"\">\r\n");
+ sb.append(" <rdf:Description rdf:about=\""+ about +"\">" + System.getProperty("line.separator") + "");
for (int x = 0; x < seeAlsos.length; x++) {
- sb.append(" <rdfs:seeAlso rdf:resource=\"" + seeAlsos[x] + "\"/>\r\n");
+ sb.append(" <rdfs:seeAlso rdf:resource=\"" + seeAlsos[x] + "\"/>" + System.getProperty("line.separator") + "");
}
- sb.append("</rdf:Description>\r\n");
+ sb.append("</rdf:Description>" + System.getProperty("line.separator") + "");
return sb.toString();
}
private String createOntologyBlock(String about, String title,
String description) {
- String s ="\r\n<owl:Ontology \r\n" + " rdf:about=\"" + about
- + "\">\r\n" + " <dc:title>" + title + "</dc:title>\r\n"
- + " <dc:description>" + description + "</dc:description>\r\n"
- + "</owl:Ontology>\r\n";
+ String s ="" + System.getProperty("line.separator") + "<owl:Ontology " + System.getProperty("line.separator") + "" + " rdf:about=\"" + about
+ + "\">" + System.getProperty("line.separator") + "" + " <dc:title>" + title + "</dc:title>" + System.getProperty("line.separator") + ""
+ + " <dc:description>" + description + "</dc:description>" + System.getProperty("line.separator") + ""
+ + "</owl:Ontology>" + System.getProperty("line.separator") + "";
return s;
}
private String createEscapedComment(String comment) {
- String s = "\r\n<!-- " + comment + " -->\r\n";
+ String s = "" + System.getProperty("line.separator") + "<!-- " + comment + " -->" + System.getProperty("line.separator") + "";
return s;
}
public static void main(String[] args) throws Exception {
- System.out.println(new RESOURCE().getRESOURCES("Namespaces"));
+ System.out.println(new RESOURCE().getRESOURCES("Predicates"));
}
}
\ No newline at end of file
More information about the MOBY-guts
mailing list