You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2016/05/25 10:35:04 UTC
[1/2] jena git commit: schemagen M_MODEL is final + naming conventions
Repository: jena
Updated Branches:
refs/heads/master e55361dcb -> f2ae5dba8
schemagen M_MODEL is final + naming conventions
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/741e3ed1
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/741e3ed1
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/741e3ed1
Branch: refs/heads/master
Commit: 741e3ed188e63d100589e7c6dacfc742dd2e3849
Parents: 933a323
Author: vcelakp <vc...@users.noreply.github.com>
Authored: Wed May 18 21:55:49 2016 +0200
Committer: vcelakp <vc...@users.noreply.github.com>
Committed: Wed May 18 21:55:49 2016 +0200
----------------------------------------------------------------------
jena-cmds/src/main/java/jena/schemagen.java | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/741e3ed1/jena-cmds/src/main/java/jena/schemagen.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/jena/schemagen.java b/jena-cmds/src/main/java/jena/schemagen.java
index 0512506..698cc7d 100644
--- a/jena-cmds/src/main/java/jena/schemagen.java
+++ b/jena-cmds/src/main/java/jena/schemagen.java
@@ -74,13 +74,13 @@ public class schemagen {
public static final String DEFAULT_MARKER = "%";
/** Default template for writing out value declarations */
- public static final String DEFAULT_TEMPLATE = "public static final %valclass% %valname% = m_model.%valcreator%( \"%valuri%\" );";
+ public static final String DEFAULT_TEMPLATE = "public static final %valclass% %valname% = M_MODEL.%valcreator%( \"%valuri%\" );";
/** Default template for writing out individual declarations */
- public static final String DEFAULT_INDIVIDUAL_TEMPLATE = "public static final %valclass% %valname% = m_model.%valcreator%( \"%valuri%\", %valtype% );";
+ public static final String DEFAULT_INDIVIDUAL_TEMPLATE = "public static final %valclass% %valname% = M_MODEL.%valcreator%( \"%valuri%\", %valtype% );";
/** Default template for writing out individual declarations for non-ontology vocabularies */
- public static final String DEFAULT_RDFS_INDIVIDUAL_TEMPLATE = "public static final %valclass% %valname% = m_model.%valcreator%( \"%valuri%\" );";
+ public static final String DEFAULT_RDFS_INDIVIDUAL_TEMPLATE = "public static final %valclass% %valname% = M_MODEL.%valcreator%( \"%valuri%\" );";
/** Default template for the file header */
public static final String DEFAULT_HEADER_TEMPLATE = "/* CVS $" + "Id: $ */%nl%%package% %nl%%imports% %nl%/**%nl% * Vocabulary definitions from %sourceURI% %nl% * @author Auto-generated by schemagen on %date% %nl% */";
@@ -603,11 +603,11 @@ public class schemagen {
lang = "RDFS";
}
writeln( 1, "/** <p>The ontology model that holds the vocabulary terms</p> */" );
- writeln( 1, "private static OntModel m_model = ModelFactory.createOntologyModel( OntModelSpec." + lang + "_MEM, null );" );
+ writeln( 1, "private static final OntModel M_MODEL = ModelFactory.createOntologyModel( OntModelSpec." + lang + "_MEM, null );" );
}
else {
writeln( 1, "/** <p>The RDF model that holds the vocabulary terms</p> */" );
- writeln( 1, "private static Model m_model = ModelFactory.createDefaultModel();" );
+ writeln( 1, "private static final Model M_MODEL = ModelFactory.createDefaultModel();" );
}
writeln( 1 );
@@ -646,7 +646,7 @@ public class schemagen {
writeln( 0, "" );
writeln( 1, "/** Read the ontology definition into the source model */ " );
writeln( 1, "static { " );
- writeln( 2, "m_model.read( new ByteArrayInputStream( SOURCE.getBytes() ), null, \"N3\" );" );
+ writeln( 2, "M_MODEL.read( new ByteArrayInputStream( SOURCE.getBytes() ), null, \"N3\" );" );
writeln( 1, "}" );
writeln( 0, "" );
}
@@ -677,12 +677,13 @@ public class schemagen {
writeln( 1 );
writeln( 1, "/** <p>The namespace of the vocabulary as a string</p>" );
- writeln( 1, " * @see #NS */" );
+ writeln( 1, " * @return namespace as String" );
+ writeln( 1, " * @see #NS */" );
writeln( 1, "public static String getURI() {return NS;}" );
writeln( 1 );
writeln( 1, "/** <p>The namespace of the vocabulary as a resource</p> */" );
- writeln( 1, "public static final Resource NAMESPACE = m_model.createResource( NS );" );
+ writeln( 1, "public static final Resource NAMESPACE = M_MODEL.createResource( NS );" );
writeln( 1 );
}
@@ -1015,7 +1016,7 @@ public class schemagen {
if (cls == null) { cls = OWL.Thing; }
String varName = m_resourcesToNames.get( cls );
- String valType = (varName != null) ? varName : "m_model.createClass( \"" + cls.getURI() + "\" )";
+ String valType = (varName != null) ? varName : "M_MODEL.createClass( \"" + cls.getURI() + "\" )";
// push the individuals type onto the stack
addReplacementPattern( "valtype", valType );
[2/2] jena git commit: JENA-1186: Merge commit 'refs/pull/147/head'
of github.com:apache/jena
Posted by an...@apache.org.
JENA-1186: Merge commit 'refs/pull/147/head' of github.com:apache/jena
This closes #147.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/f2ae5dba
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/f2ae5dba
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/f2ae5dba
Branch: refs/heads/master
Commit: f2ae5dba8932b8166148f3ef4772905175b1e5df
Parents: e55361d 741e3ed
Author: Andy Seaborne <an...@apache.org>
Authored: Wed May 25 11:31:41 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Wed May 25 11:31:41 2016 +0100
----------------------------------------------------------------------
jena-cmds/src/main/java/jena/schemagen.java | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------