Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 30 additions & 20 deletions bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>cdk</artifactId>
<groupId>org.openscience.cdk</groupId>
<version>2.8-SNAPSHOT</version>
</parent>

<artifactId>cdk-bundle</artifactId>

<name>cdk-bundle</name>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -240,11 +240,6 @@
<artifactId>cdk-qm</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cdk-iordf</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cdk-libiomd</artifactId>
Expand Down Expand Up @@ -315,17 +310,17 @@
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<configuration>
<finalName>cdk-${project.parent.version}</finalName>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<finalName>cdk-${project.parent.version}</finalName>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
Expand All @@ -335,7 +330,22 @@
</goals>
</execution>
</executions>
</plugin>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk11-plus</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cdk-iordf</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
19 changes: 17 additions & 2 deletions storage/iordf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,22 @@
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
<version>2.7.4</version>
<version>4.5.0</version>
<exclusions>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>4.5.0</version>
<exclusions>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
Expand All @@ -32,7 +47,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.10</version>
<version>1.7.36</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import java.io.InputStreamReader;
import java.io.Reader;

import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IChemObject;
Expand All @@ -35,9 +37,6 @@
import org.openscience.cdk.io.formats.IResourceFormat;
import org.openscience.cdk.libio.jena.Convertor;

import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;

/**
* Reads content from a CDK OWL serialization.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import java.io.OutputStreamWriter;
import java.io.Writer;

import org.apache.jena.rdf.model.Model;
import org.apache.jena.riot.Lang;
import org.apache.jena.riot.RDFDataMgr;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IChemObject;
Expand All @@ -31,8 +34,6 @@
import org.openscience.cdk.io.formats.IResourceFormat;
import org.openscience.cdk.libio.jena.Convertor;

import com.hp.hpl.jena.rdf.model.Model;

/**
* Serializes the data model into CDK OWL.
*
Expand Down Expand Up @@ -107,7 +108,7 @@ public void write(IChemObject object) throws CDKException {
try {
writeMolecule((IAtomContainer) object);
} catch (Exception ex) {
throw new CDKException("Error while writing HIN file: " + ex.getMessage(), ex);
throw new CDKException("Error while writing CDK OWL file: " + ex.getMessage(), ex);
}
} else {
throw new CDKException("CDKOWLWriter only supports output of IAtomContainer classes.");
Expand All @@ -116,7 +117,7 @@ public void write(IChemObject object) throws CDKException {

private void writeMolecule(IAtomContainer mol) {
Model model = Convertor.molecule2Model(mol);
model.write(output, "N3");
RDFDataMgr.write(output, model, Lang.RDFXML);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
*/
package org.openscience.cdk.libio.jena;

import com.hp.hpl.jena.rdf.model.Property;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.ResourceFactory;
import com.hp.hpl.jena.vocabulary.RDF;
import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.vocabulary.RDF;

/**
* Helper class to provide a Java API to the CDK OWL ontology, following the design of similar namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
import java.util.HashMap;
import java.util.Map;

import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.ResIterator;
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.Statement;
import org.apache.jena.rdf.model.StmtIterator;
import org.apache.jena.vocabulary.RDF;
import org.openscience.cdk.CDKConstants;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
Expand All @@ -40,14 +47,6 @@
import org.openscience.cdk.interfaces.IIsotope;
import org.openscience.cdk.interfaces.IPseudoAtom;

import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.ResIterator;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.Statement;
import com.hp.hpl.jena.rdf.model.StmtIterator;
import com.hp.hpl.jena.vocabulary.RDF;

/**
* Helper class that converts a CDK {@link IChemObject} into RDF using a
* Jena model and the CDK data model ontology.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/
package org.openscience.cdk.libio.jena;

import org.apache.jena.rdf.model.Model;
import org.junit.Assert;
import org.junit.Test;
import org.openscience.cdk.test.CDKTestCase;
Expand All @@ -38,8 +39,6 @@
import org.openscience.cdk.silent.SilentChemObjectBuilder;
import org.openscience.cdk.tools.diff.AtomContainerDiff;

import com.hp.hpl.jena.rdf.model.Model;

/**
* @cdk.module test-iordf
*/
Expand Down
15 changes: 12 additions & 3 deletions storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>cdk</artifactId>
<groupId>org.openscience.cdk</groupId>
Expand All @@ -14,7 +14,6 @@
<module>ctab</module>
<module>io</module>
<module>ioformats</module>
<module>iordf</module>
<module>libiocml</module>
<module>libiomd</module>
<module>pdb</module>
Expand All @@ -25,5 +24,15 @@
</modules>
<packaging>pom</packaging>
<artifactId>cdk-storage</artifactId>

<profiles>
<profile>
<id>jdk11-plus</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<modules>
<module>iordf</module>
</modules>
</profile>
</profiles>
</project>