You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2016/08/01 00:08:06 UTC

[17/51] [partial] incubator-juneau git commit: Initial Juno contents from IBM JazzHub repo

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/Rdf.java
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/Rdf.java b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/Rdf.java
new file mode 100755
index 0000000..ec52ab5
--- /dev/null
+++ b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/Rdf.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Licensed Materials - Property of IBM
+ * (c) Copyright IBM Corporation 2014, 2015. All Rights Reserved.
+ *
+ *  The source code for this program is not published or otherwise
+ *  divested of its trade secrets, irrespective of what has been
+ *  deposited with the U.S. Copyright Office.
+ *******************************************************************************/
+package com.ibm.juno.core.jena.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+import java.lang.annotation.*;
+
+import com.ibm.juno.core.jena.*;
+
+/**
+ * Annotation for specifying options for RDF serializers.
+ * <p>
+ * 	Can be applied to Java packages, types, fields, and methods.
+ * <p>
+ * 	Can be used for the following:
+ * <ul>
+ * 	<li>Override the default behavior of how collections and arrays are serialized.
+ * </ul>
+ *
+ * @author James Bognar (jbognar@us.ibm.com)
+ */
+@Documented
+@Target({PACKAGE,TYPE,FIELD,METHOD})
+@Retention(RUNTIME)
+@Inherited
+public @interface Rdf {
+
+	/**
+	 * Sets the XML prefix of this property or class.
+	 * <p>
+	 * 	Must either be matched to a {@link #namespace()} annotation on the same object, parent object, or a {@link RdfNs} with the same name
+	 * 	through the {@link RdfSchema#rdfNs()} annotation on the package.
+	 * </p>
+	 */
+	String prefix() default "";
+
+	/**
+	 * Sets the namespace URI of this property or class.
+	 * <p>
+	 * 	Must be matched with a {@link #prefix()} annotation on this object, a parent object, or a {@link RdfNs} with the same name
+	 * 	through the {@link RdfSchema#rdfNs()} annotation on the package.
+	 */
+	String namespace() default "";
+
+	/**
+	 * The format for how collections (e.g. lists and arrays) are serialized in RDF.
+	 * @see RdfCollectionFormat
+	 */
+	RdfCollectionFormat collectionFormat() default RdfCollectionFormat.DEFAULT;
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfNs.class
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfNs.class b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfNs.class
new file mode 100755
index 0000000..44818eb
Binary files /dev/null and b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfNs.class differ

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfNs.java
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfNs.java b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfNs.java
new file mode 100755
index 0000000..96ef14d
--- /dev/null
+++ b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfNs.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Licensed Materials - Property of IBM
+ * (c) Copyright IBM Corporation 2014, 2015. All Rights Reserved.
+ *
+ *  The source code for this program is not published or otherwise
+ *  divested of its trade secrets, irrespective of what has been
+ *  deposited with the U.S. Copyright Office.
+ *******************************************************************************/
+package com.ibm.juno.core.jena.annotation;
+
+import static java.lang.annotation.RetentionPolicy.*;
+
+import java.lang.annotation.*;
+
+/**
+ * Namespace name/URL mapping pair.
+ * <p>
+ * 	Used to identify a namespace/URI pair on a {@link RdfSchema#rdfNs()} annotation.
+ *
+ * @author James Bognar (jbognar@us.ibm.com)
+ */
+@Documented
+@Target({})
+@Retention(RUNTIME)
+@Inherited
+public @interface RdfNs {
+
+	/**
+	 * RDF namespace prefix.
+	 */
+	String prefix();
+
+	/**
+	 * RDF namespace URL.
+	 */
+	String namespaceURI();
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfSchema.class
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfSchema.class b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfSchema.class
new file mode 100755
index 0000000..9e2038d
Binary files /dev/null and b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfSchema.class differ

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfSchema.java
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfSchema.java b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfSchema.java
new file mode 100755
index 0000000..00d6485
--- /dev/null
+++ b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/RdfSchema.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Licensed Materials - Property of IBM
+ * (c) Copyright IBM Corporation 2014, 2015. All Rights Reserved.
+ *
+ *  The source code for this program is not published or otherwise
+ *  divested of its trade secrets, irrespective of what has been
+ *  deposited with the U.S. Copyright Office.
+ *******************************************************************************/
+package com.ibm.juno.core.jena.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+import java.lang.annotation.*;
+
+/**
+ * Identifies the default RDF namespaces at the package level.
+ *
+ * @author James Bognar (jbognar@us.ibm.com)
+ */
+@Documented
+@Target(PACKAGE)
+@Retention(RUNTIME)
+@Inherited
+public @interface RdfSchema {
+
+	/**
+	 * Sets the default RDF prefix for all classes in this and child packages.
+	 * <p>
+	 * 	Must either be matched with a {@link #namespace()} annotation, or an {@link #rdfNs()} mapping with the
+	 * 	same {@link RdfNs#prefix} value.
+	 * </p>
+	 */
+	public String prefix() default "";
+
+	/**
+	 * Sets the default RDF namespace URL for all classes in this and child packages.
+	 * <p>
+	 * 	Must either be matched with a {@link #prefix()} annotation, or an {@link #rdfNs()} mapping with the
+	 * 	same {@link RdfNs#namespaceURI} value.
+	 * </p>
+	 */
+	public String namespace() default "";
+
+	/**
+	 * Lists all namespace mappings to be used on all classes within this package.
+	 * <p>
+	 * 	The purpose of this annotation is to allow namespace mappings to be defined in a single location
+	 * 	and referred to by name through just the {@link Rdf#prefix()} annotation.
+	 * <p>
+	 * 	Inherited by child packages.
+	 *
+	 * <dl>
+	 * 	<dt>Example:</dt>
+	 * 	<dd>
+	 * <p>
+	 * 	Contents of <code>package-info.java</code>...
+	 * </p>
+	 * <p class='bcode'>
+	 * 	<jc>// XML namespaces used within this package.</jc>
+	 * 	<ja>@RdfSchema</ja>(prefix=<js>"ab"</js>,
+	 * 		namespaces={
+	 * 			<ja>@RdfNs</ja>(prefix=<js>"ab"</js>, namespaceURI=<js>"http://www.ibm.com/addressBook/"</js>),
+	 * 			<ja>@RdfNs</ja>(prefix=<js>"per"</js>, namespaceURI=<js>"http://www.ibm.com/person/"</js>),
+	 * 			<ja>@RdfNs</ja>(prefix=<js>"addr"</js>, namespaceURI=<js>"http://www.ibm.com/address/"</js>),
+	 * 			<ja>@RdfNs</ja>(prefix=<js>"mail"</js>, namespaceURI="<js>http://www.ibm.com/mail/"</js>)
+	 * 		}
+	 * 	)
+	 * 	<jk>package</jk> com.ibm.sample.addressbook;
+	 * 	<jk>import</jk> com.ibm.juno.core.rdf.annotation.*;
+	 * </p>
+	 * <p>
+	 * 	Class in package using defined namespaces...
+	 * </p>
+	 * <p class='bcode'>
+	 * 	<jk>package</jk> com.ibm.sample.addressbook;
+	 *
+	 * 	<jc>// Bean class, override "ab" namespace on package.</jc>
+	 * 	<ja>@Rdf</ja>(prefix=<js>"addr"</js>)
+	 * 	<jk>public class</jk> Address {
+	 *
+	 * 		<jc>// Bean property, use "addr" namespace on class.</jc>
+	 * 		<jk>public int</jk> <jf>id</jf>;
+	 *
+	 * 		<jc>// Bean property, override with "mail" namespace.</jc>
+	 * 		<ja>@Rdf</ja>(prefix=<js>"mail"</js>)
+	 * 		<jk>public</jk> String <jf>street</jf>, <jf>city</jf>, <jf>state</jf>;
+	 * 	}
+	 * </p>
+	 * 	</dd>
+	 * </dl>
+	 */
+	public RdfNs[] rdfNs() default {};
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/package.html
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/package.html b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/package.html
new file mode 100755
index 0000000..3e8af8d
--- /dev/null
+++ b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/annotation/package.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<!--
+    Licensed Materials - Property of IBM
+    (c) Copyright IBM Corporation 2014. All Rights Reserved.
+   
+    Note to U.S. Government Users Restricted Rights:  
+    Use, duplication or disclosure restricted by GSA ADP Schedule 
+    Contract with IBM Corp. 
+ -->
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css">
+		/* For viewing in Page Designer */
+		@IMPORT url("../../../../../../../javadoc.css");
+
+		/* For viewing in REST interface */
+		@IMPORT url("../htdocs/javadoc.css");
+		body { 
+			margin: 20px; 
+		}	
+	</style>
+	<script>
+		/* Replace all @code and @link tags. */	
+		window.onload = function() {
+			document.body.innerHTML = document.body.innerHTML.replace(/\{\@code ([^\}]+)\}/g, '<code>$1</code>');
+			document.body.innerHTML = document.body.innerHTML.replace(/\{\@link (([^\}]+)\.)?([^\.\}]+)\}/g, '<code>$3</code>');
+		}
+	</script>
+</head>
+<body>
+<p>RDF annotations</p>
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_HTML.png
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_HTML.png b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_HTML.png
new file mode 100755
index 0000000..b4a3576
Binary files /dev/null and b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_HTML.png differ

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_N3.png
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_N3.png b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_N3.png
new file mode 100755
index 0000000..16613a4
Binary files /dev/null and b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_N3.png differ

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_NTriple.png
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_NTriple.png b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_NTriple.png
new file mode 100755
index 0000000..9da3ffa
Binary files /dev/null and b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_NTriple.png differ

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_RDFXML.png
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_RDFXML.png b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_RDFXML.png
new file mode 100755
index 0000000..13f2b43
Binary files /dev/null and b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_RDFXML.png differ

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_RDFXMLABBREV.png
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_RDFXMLABBREV.png b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_RDFXMLABBREV.png
new file mode 100755
index 0000000..e1ffa09
Binary files /dev/null and b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_RDFXMLABBREV.png differ

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7e4f63e6/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_Turtle.png
----------------------------------------------------------------------
diff --git a/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_Turtle.png b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_Turtle.png
new file mode 100755
index 0000000..0fd2b36
Binary files /dev/null and b/com.ibm.team.juno.releng/bin/core/com/ibm/juno/core/jena/doc-files/Example_Turtle.png differ