Schema type for "Bookmark" items - microdata

Is there an appropriate schema type for bookmark items such as in Reddit, Digg, etc.?
Is it OK to use the "Article"?

article is appropriate for a blogpost, so that makes sense to me. there is no specification for bookmarks in schema.org. i would use rel="tag" to implement microformats. microformats are not the same thing as schema.org/microdata. schema.org article: http://schema.org/Article microformats tag: http://microformats.org/wiki/rel-tag

Related

What is the 'section' field in a google classroom course used for?

I've noticed there is a section field for a course in the Google Classroom API. It doesn't appear in the user interface (that I can find anywhere). What is it supposed to be used for? Does it alter the UI in any way? Can I put by own (non-user-accessible) data in there?
It does appear in the UI, as a sort of sub-heading under the name:
(Change it by hitting the "three dots" in the screenshot, and selecting "Rename".)
Setting is a field that you can use for class details. To get to the front end where users input the section information on an open-ended filed, go into course setting to access class details.

Drupal 7: Combining multiple content type in single view

I have a content type called Author which is referred in another two content types called Novel and Book via Node Reference Module.So we can add author entity to both Book and Novel content types.
Both Novel and Book contain another field called Release Date.
Now I want to show a block which will display the name of book and name of novel in chronological order based upon the release date when user come to that corresponding Author Page.
Ex. Suppose A is an author who is author of BookA(Release Yr-2006), NovelB(Release Yr-2004),BookC(Release Year-2009). When user come to Author A page then he will be shown a block which will show the Books/Albums in chronological order like this:-
NovelB--BookA--BookC
Please suggest as how to achieve in Drupal 7.
You want to display the following field title (I assume the book name is the node title)
For the sorting you can use the sort option in views, it is pretty self-explaining. Choose the name of your release date field.
For the connection between author and books you will have to use a contextual filter (advanced).
Add the author-reference-field from your book/novel (the field you use to refer to the author). Then choose to use a default value (2nd option) and choose content id from url. Now your block will find all nodes that refer to the page with the current page-id. Since we chose to display the title fields, you should see a list.
Note that live preview does not work here, so you will have to go to the actual page to see the result.
UPDATE:
This works when you have re-used the same field for both content types. If you have uses more then one field you will have to use an OR operator to make the contextual filter work. Thanks to d34dman the following page was given to do just that.
Although for new implementations I would recommend using the same field (eg. reference_to_author) for all references from all content types.
Yah..I am able to solve this problem by adding custom code. I have used hook_views_query_alter method and then added join relationship and where clause as per requirement. Please refer to following article for more clarity..
http://www.midwesternmac.com/blogs/jeff-geerling/filtersearch-multiple-fields
Thanks for posting the reply and keeping my hope alive.

Sparql views - query

I have made view (spraql view) called Person with fields: name, street adress, organization.., e-mail usign some foaf and schema ontology. But I cant find out how to specify sparql query. I need to get only people with specific adress for exmaple: person where adress is "road 1". Is there possibility to set up this?
... many thanks for your answers (and tutorials also)..
If you are looking to learn SPARQL then Leigh Feigenbaum's SPARQL by Example is a great place to start
I would like to recommend you reading Bob DuCharme's "Learning SPARQL" book.

Project references with microdata

I have a site where I need to list my projects from before. They are websites with name, URL, description, list of used technologies, and an image gallery.
I was searching for a schema for it on schema.org, but I was not able to find a fitting one. What itemscopes should I use?
There is no good fit for what you need in the current available Schemas on http://schema.org.
What I'd do:
Use http://schema.org/WebPage for your webpage definition, along with parts of http://schema.org/WebPageElement as needed.
Use http://schema.org/Person for defining yourself
Lastly for each project, I'd use what's already there for the parent Creative Work schema (http://schema.org/CreativeWork) since there is no sub-schema under it that fits for you. I'd then just define attributes and values for about, datePublished, author, headline, keywords. Also define editor, video, awards and publisher if appropriate.

Model for localizable attribute values in Core Data Entity?

If I want to create a entity in Core Data that has attributes with values that should be localizable I'm wondering how the most efficient way would look like?
As a example let's assume the following structure:
Book
name (localizable)
description (localizable)
author
An localized book entry would look like this:
name: "A great novel" (en/international),
"Ein großartiger Roman" (de),
"Un grand roman" (fr)
description:
"Great!" (en/international),
"Großartig!" (de),
"Grand!" (fr)
author: "John Smith"
In a SQL/SQLite implementation I would use two tables. A books table containing the book information (author, the english/international name and description) and the localizationBooks table that is related using the primary key of the corresponding book. This second table contains the localized name and description values as well as the languageCode. This would allow to have a scalable number of localizations.
For fetching the data I would use a
SELECT COALESCE(localizationBooks.name, books.name)
to get the actual values for the given language code. This allows to use the international english value as fallback for unsupported languages.
Would this require a separate entity in Core Data (e.g. BookLocalization) that has a relation to the Book or is there another recommended way of doing this?
The strategy you mention is usually the best. As you suggest, this requires an extra entity for the localized properties.
You can then write a helper method on your Books entity to get the appropriate localization object for a given language and use it like this:
[book bookLocalizationForLanguage:#"de"].name
You could even take it a step further and just add properties like localizedName, localizedDescription on the Books entity which will fetch the appropriate localized value.
Well, despite that this topic is 3 years old... I just stumbled upon it, asking my self the very same as the original poster. I found another thread with an answer.
I'll just repeat it in here in case somebody else hits this thread (Answer from Gordon Hughes):
Good practices for multiple language data in Core Data
To summarize:
Let's say you have Entity Books. Then you will have to make an additional one, called Localizedbook for example. In Books you have the attribute "title" and in LocalizedBook you have "localizedTitle" and "locale" for international strings like "en_US".
You now have to set the relationship between title -> localizedTitle (one to many, as one original title can have multiple translations).
So, every time you fetch "title" you will get the "localizedTitle" given to a specific locale, if the relations are set correctly.

Resources