This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> | |
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> | |
PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
PREFIX dc: <http://purl.org/dc/terms/> | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE xsl:stylesheet [ | |
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#"> | |
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | |
<!ENTITY foaf "http://xmlns.com/foaf/0.1/"> | |
<!ENTITY dcterms "http://purl.org/dc/terms/"> | |
<!ENTITY dc "http://purl.org/dc/elements/1.1/"> | |
<!ENTITY mo "http://purl.org/ontology/mo/"> | |
]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpPost httppost=new HttpPost(ggserverurl+phpexec); | |
HttpResponse response; | |
HttpEntity entity; | |
BufferedReader bufferedreader; | |
List <NameValuePair> parameters = new ArrayList <NameValuePair>(); | |
parameters.add(new BasicNameValuePair("a", "a")); | |
parameters.add(new BasicNameValuePair("b", "b")); | |
parameters.add(new BasicNameValuePair("c", "c")); | |
parameters.add(new BasicNameValuePair("d", "e")); | |
parameters.add(new BasicNameValuePair("e", "f")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String applyXslt(String xsltString, String xmlToLift, String lodUri) throws ParserConfigurationException, SAXException, IOException, TransformerException { | |
// create transformer | |
Transformer xsltTransformer = HtmlTransformerFactory.createXsltTransformerByContent(xsltString); | |
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); | |
DocumentBuilder parser = factory.newDocumentBuilder(); | |
Document document = parser.parse(new ByteArrayInputStream(xmlToLift.getBytes()), null); | |
DOMSource source = new DOMSource(document); | |
ByteArrayOutputStream bout = new ByteArrayOutputStream(); | |
StreamResult result = new StreamResult(bout); | |
if ( lodUri != null ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void printMap(Map<String, String> map) { | |
Set<String> keys = map.keySet(); | |
Iterator<String> iter = keys.iterator(); | |
while ( iter.hasNext() ) { | |
String key = iter.next(); | |
System.out.println("Key: " + key); | |
String obj = map.get(key); | |
System.out.println(obj); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.setProperty("http.proxyHost", "host"); | |
System.setProperty("http.proxyPort", "port"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File folder = new File(FOLDER); | |
if ( folder.isDirectory() == true ) { | |
File[] docList = folder.listFiles(); | |
if ( docList != null ) { | |
for ( File doc : docList ) { | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<properties> | |
<maven.compiler.source>1.6</maven.compiler.source> | |
<maven.compiler.target>1.6</maven.compiler.target> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
</properties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<artifactId>maven-assembly-plugin</artifactId> | |
<configuration> | |
<archive> | |
<manifest> | |
<mainClass>package.MainClass</mainClass> | |
</manifest> | |
</archive> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.io.InputStream inputStream = getClass().getClassLoader().getResourceAsStream("relative-path"); |
OlderNewer