Avoid sharing script objects or script arrays across threads (this includes global.) Sharing script objects is asking for trouble. Share only primitive data types, or Java objects.
This is a list of 10 best practices that are more subtle than your average Josh Bloch Effective Java rule. While Josh Bloch's list is very easy to learn and concerns everyday situations, this list here contains less common situations involving API / SPI design that may have a big effect nontheless. I have encountered…
// create the JAXP XPath evaluation environment.
XPath xpath = XPathFactory.newInstance().newXPath();
// creat an xpath expression. This example select all nodes with the
// name 'link' from the root of the document.
String expression = "//link";
// get a list of nodes using the xpath environment, DOM Document and the
// XPath expression. Specify the type of node that is retrived (in this
// case its a NODESET which is a list of nodes)
NodeList linkNodes = (NodeList) xpath.evaluate(expression, bbcDoc, XPathConstants.NODESET);
for (int i = 0; i < linkNodes.getLength(); i++) {
// System.out.println(linkNodes.item(i).getTextContent());
}
// Convert elements to strings and concatenate them, separated by commas String joined = things.stream() .map(Object::toString) .collect(Collectors.joining(", "));
Learn Java 8 streams by example: functional programming with filter, map, flatMap, reduce, collect, lambdas, sequential and parallel streams are covered in-depth in this tutorial.
linking Iterators together in this manner is more efficient (and convenient) than reading out the contents of each Iterator into a List and creating a new Iterator.
CycQL is a Jena+ARQ based SPARQL adapter for OpenCyc 2.0. It enables one of the most powerful inference engines in the world to be used with Semantic Web tools. Cyc itself achieves scalability and optimizes inference by restricting the search space to the relevant subset of microtheories. The main features of this release are the SPARQL 1.1 syntax, the identification of named graphs with microtheories, the use of RDF (DBpedia) URLs, and special handling of Cyc Non-Atomic Terms (NATs).
The SKOS API is a Java interface and implementation for the W3C Simple Knowledge Organisation System SKOS. For more information about SKOS see here. An implementation of the SKOS API is provided which uses the OWL 2 API, at present you will need to obtain the OWL API seperately from the OWL 2 website. [UPDATE 12-09-2011] The current release of the SKOS API has been deprecated, a new version_3 developer branch is available in the SVN repository that works with the latest OWL API v3.
For more information please contact the user group at skos-dev@googlegroups.com
The SKOS API is open source and is available under the LGPL License
The SKOS API includes the following components:
An API for the major SKOS constructs and an efficient in-memory reference implementation based on the OWL 2 API
Abstract data model for working for SKOS that avoids commitment to any of the concrete syntaxes, such as RDF
RDF/XML parser and writer
OWL/XML parser and writer
OWL Functional Syntax parser and writer
Turtle parser and writer
Support for extending the underlying SKOS data model via the OWL 2 API
Support for integration with reasoners such as Pellet and FaCT++
Range of convenience methods for working with SKOS
discuss how paintComponent can be overridden to customize the look of your components, and then we'll discuss a trick that uses paintChildren to paint custom content on top of the component and its children.
a high performance scene graph based graphics API. Much of the inspiration for jME comes from David Eberly's book 3D Game Engine Design. jME was built to fulfill the lack of full featured graphics engines written in Java.
feature-rich and very fast scenegraph-engine. Its purpose is to deliver a toolkit for the creation of interactive 3D environments using the graphic-hardware of common desktop computers.