How to set properties using the Java API

1 view
Skip to first unread message

john....@gmail.com

unread,
Jun 11, 2014, 1:10:50 PM6/11/14
to sta...@clarkparsia.com
Hi,
(Apologies if there is a simple answer jumping out of the documentation :-)  )

How do I set a property for a DB or Connection using the Java API ?
Either at creation time, or after creation?

Some of the properties have utility methods on the Configuration/Connection builders, (e.g. reasoning, credentials, etc)
Some can be set by finding an appropriate MetaProperty for the property and setting it that way (an example of this would be good too :-) )

But for others I see no way to set using the java API (e.g. reasoning.schema.graphs )

Any pointer would be helpful.

Thanks,
John


Mike Grove

unread,
Jun 11, 2014, 1:19:09 PM6/11/14
to stardog
Given an AdminConnection [1] to the system:

aAdminConnection.set("theDb", DatabaseOptions.SCHEMA_GRAPHS, Lists.newArrayList(Values.uri("urn:my:schema:graph")));

The list of options are described in the docs [2] and you can see them here [3] in the javadocs.

Note that options specified on ConnectionConfiguration, or AdminConnectionConfiguration, only pertain to the parameters for the connection, such as the authentication credentials.  They are specific to the session of that connection.

Properties set via the AdminConnection interface are for a *database* and will affect its behavior globally.  Finally, there are some system properties [4], which can be set via stardog.properties, which affect the entire DBMS.

Cheers,

Mike



Any pointer would be helpful.

Thanks,
John


--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

John Keeney

unread,
Jun 11, 2014, 2:51:02 PM6/11/14
to sta...@clarkparsia.com

Thanks!
That's exactly what I was looking for:-)

Reply all
Reply to author
Forward
0 new messages