Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PropertyTypeFinder (smwgFixedProperties) #2135

Merged
merged 1 commit into from Dec 31, 2016

Conversation

Projects
None yet
2 participants
@mwjames
Copy link
Contributor

commented Dec 31, 2016

This PR is made in reference to: SemanticMediaWiki/semantic-mediawiki.org#14

This PR addresses or contains:

  • Simplify $smwgFixedProperties customizing where the type is now read from the property instead of having it declared as customizing which would create issues when the type on the property page and the $smwgFixedProperties setting are different from each other
  • Table name is no longer the complete md5 hash instead substr( base_convert( md5( $tableName ), 16, 32 ), 0, 12 ) is used to get a shorter ID
  • Property page now displays a message that any change to its type requires some admin activity
$GLOBALS['smwgFixedProperties'] = array(
	'Has fixed test'
);

image

This PR includes:

  • Tests (unit/integration)
  • CI build passed

@mwjames mwjames added the enhancement label Dec 31, 2016

@mwjames mwjames added this to the SMW 2.5 milestone Dec 31, 2016

@mwjames

This comment has been minimized.

Copy link
Contributor Author

commented Dec 31, 2016

@kghbln FYI

@mwjames mwjames merged commit cb7d267 into master Dec 31, 2016

3 checks passed

Scrutinizer 15 new issues, 15 updated code elements
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@mwjames mwjames deleted the fix-prop branch Dec 31, 2016

@kghbln

This comment has been minimized.

Copy link
Member

commented Jan 7, 2017

How awesome is this???!!! Great and many thanks!!! Just documented.

What about RDF stores? Will this work for them too? I suppose so.

@kghbln kghbln removed the wikidocu missing label Jan 7, 2017

@kghbln

This comment has been minimized.

Copy link
Member

commented Jan 7, 2017

This is a highlight thus 7f3fe52

@mwjames

This comment has been minimized.

Copy link
Contributor Author

commented Jan 8, 2017

This is a highlight thus 7f3fe52

At first, I just wanted to scratch an itch where a DataItem object reference would appear in the LocalSettings and I ended up fixing the whole "Fixed Properties" issue.

Property names must use underscores and not spaces or you will see MWException errors on some page actions.

Properties without an underscore do no longer cause a MWException, meaning that Has_fixed_text and Has fixed text will be handled as equivalent [0].

What about RDF stores? Will this work for them too? I suppose so.

This issue relates to the creation of extra DB tables with a RDF store not being linked to internal changes of the SQLStore therefore declaring properties as fixed table properties will have no effect on the SPARQLStore or for that matter to the RDF export.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/2135/files#diff-53920baeff0ad9c3bad870946bb97034R221

@kghbln

This comment has been minimized.

Copy link
Member

commented Jan 8, 2017

Properties without an underscore do no longer cause a MWException, meaning that Has_fixed_text and Has fixed text will be handled as equivalent [0].

Good to know that there are less worries. :)

This issue relates to the creation of extra DB tables with a RDF store not being linked to internal changes of the SQLStore therefore declaring properties as fixed table properties will have no effect on the SPARQLStore or for that matter to the RDF export.

Thanks a lot for this info. I guess me having a better understanding of RDF store will be preferable in future.

@mwjames mwjames referenced this pull request May 27, 2017

Merged

TableChangeOp to record fixed property, refs 2135, 2388 #2483

2 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.