Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Commit

Permalink
Introduce vocabulary terms for foaf, rdfs & rdf. (#14)
Browse files Browse the repository at this point in the history
This makes the currnet foaf, rdfs & rdf Domains more secondary, since
people should be creating their own constraints on these vocabs.
  • Loading branch information
jadelkhoury committed Feb 7, 2020
1 parent 3316a4a commit fc3ea10
Show file tree
Hide file tree
Showing 46 changed files with 4,699 additions and 2,065 deletions.
102 changes: 76 additions & 26 deletions org.eclipse.lyo.tools.domainmodels/oslcDomainSpecifications.xml

Large diffs are not rendered by default.

5,285 changes: 3,823 additions & 1,462 deletions org.eclipse.lyo.tools.domainmodels/representations.aird

Large diffs are not rendered by default.

35 changes: 32 additions & 3 deletions org.eclipse.lyo.tools.domainmodels/vocabulary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@
<properties name="verified" label="verified"/>
</vocabularies>
<vocabularies namespaceURI="http://xmlns.com/foaf/0.1/" label="FOAF" source="http://xmlns.com/foaf/spec/" preferredNamespacePrefix="foaf">
<classes name="Agent" label="Agent"/>
<classes name="Person" label="Person" subClassOf="//@vocabularies[label='FOAF']/@classes[name='Agent']"/>
<classes name="Agent" label="Agent" comment="The Agent class is the class of agents; things that do stuff. A well known sub-class is Person, representing people. Other kinds of agents include Organization and Group. The Agent class is useful in a few places in FOAF where Person would have been overly specific. For example, the IM chat ID properties such as jabberID are typically associated with people, but sometimes belong to software bots."/>
<classes name="Person" label="Person" comment="The Person class represents people. Something is a Person if it is a person. We don't nitpic about whether they're alive, dead, real, or imaginary. The Person class is a sub-class of the Agent class, since all people are considered 'agents' in FOAF." subClassOf="//@vocabularies[label='FOAF']/@classes[name='Agent']"/>
<properties name="name" label="name" comment="The name of something is a simple textual string."/>
<properties name="familyName" label="familyName" comment="The familyName property is provided (alongside givenName) for use when describing parts of people's names. Although these concepts do not capture the full range of personal naming styles found world-wide, they are commonly used and have some value."/>
<properties name="givenName" label="givenName" comment="The givenName property is provided (alongside familyName) for use when describing parts of people's names. Although these concepts do not capture the full range of personal naming styles found world-wide, they are commonly used and have some value."/>
</vocabularies>
<vocabularies namespaceURI="http://open-services.net/ns/config#" label="OSLC Configuration Management" description="WD as of 03 July 2019" source="https://oslc-op.github.io/oslc-specs/specs/config/config-vocab.html" preferredNamespacePrefix="oslc_config">
<classes name="ChangeSet" label="ChangeSet"/>
Expand All @@ -70,7 +73,6 @@
<classes name="TestPlan" label="TestPlan"/>
<classes name="TestResult" label="TestResult"/>
<classes name="TestScript" label="TestScript"/>

<properties name="affectedByChangeRequest" label="affectedByChangeRequest"/>
<properties name="blockedByChangeRequest" label="blockedByChangeRequest"/>
<properties name="executesTestScript" label="executesTestScript"/>
Expand All @@ -87,4 +89,31 @@
<properties name="validatesRequirement" label="validatesRequirement"/>
<properties name="validatesRequirementCollection" label="validatesRequirementCollection"/>
</vocabularies>
<vocabularies namespaceURI="http://www.w3.org/2000/01/rdf-schema#" label="RDFS" preferredNamespacePrefix="rdfs">
<classes name="Class" label="Class" comment="The class resource, everything."/>
<properties name="label" label="label" comment="A human-readable name for the subject."/>
<properties name="seeAlso" label="seeAlso" comment="Further information about the subject resource."/>
<properties name="comment" label="comment" comment="A description of the subject resource."/>
<properties name="member" label="member" comment="A member of the subject resource."/>
<properties name="subClassOf" label="subClassOf" comment="The subject is a subclass of a class."/>
</vocabularies>
<vocabularies namespaceURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#" label="RDF" preferredNamespacePrefix="rdf">
<properties name="type" label="type" comment="The subject is an instance of a class."/>
<properties name="value" label="value" comment="Idiomatic property used for structured values."/>
</vocabularies>
<vocabularies namespaceURI="http://purl.org/dc/terms/" label="Dublin Core" preferredNamespacePrefix="dcterms">
<properties name="contributor" label="contributor" comment="An entity responsible for making contributions to the resource."/>
<properties name="creator" label="creator" comment="Recommended practice is to identify the creator with a URI. If this is not possible or feasible, a literal value that identifies the creator may be provided."/>
<properties name="created" label="created" comment="Recommended practice is to describe the date, date/time, or period of time as recommended for the property Date, of which this is a subproperty."/>
<properties name="description" label="description" comment="Description may include but is not limited to: an abstract, a table of contents, a graphical representation, or a free-text account of the resource."/>
<properties name="identifier" label="identifier" comment="Recommended practice is to identify the resource by means of a string conforming to an identification system. Examples include International Standard Book Number (ISBN), Digital Object Identifier (DOI), and Uniform Resource Name (URN). Persistent identifiers should be provided as HTTP URIs."/>
<properties name="modified" label="modified" comment="Recommended practice is to describe the date, date/time, or period of time as recommended for the property Date, of which this is a subproperty."/>
<properties name="relation" label="relation" comment="Recommended practice is to identify the related resource by means of a URI. If this is not possible or feasible, a string conforming to a formal identification system may be provided."/>
<properties name="subject" label="subject" comment="Recommended practice is to refer to the subject with a URI. If this is not possible or feasible, a literal value that identifies the subject may be provided. Both should preferably refer to a subject in a controlled vocabulary."/>
<properties name="title" label="title" comment="A name given to the resource."/>
<properties name="isVersionOf" label="isVersionOf" comment="Changes in version imply substantive changes in content rather than differences in format. This property is intended to be used with non-literal values. This property is an inverse property of Has Version."/>
<properties name="hasPart" label="hasPart" comment="This property is intended to be used with non-literal values. This property is an inverse property of Is Part Of."/>
<properties name="source" label="source" comment="This property is intended to be used with non-literal values. The described resource may be derived from the related resource in whole or in part. Best practice is to identify the related resource by means of a URI or a string conforming to a formal identification system."/>
<properties name="type" label="type" comment="Recommended practice is to use a controlled vocabulary such as the DCMI Type Vocabulary [DCMI-TYPE]. To describe the file format, physical medium, or dimensions of the resource, use the property Format."/>
</vocabularies>
</oscl4j_vocabulary:Vocabularies>
6 changes: 0 additions & 6 deletions oslc-domains/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/src/main/java/org/eclipse/lyo/oslc4j/core/model/*
!/src/main/java/org/eclipse/lyo/oslc4j/core/model/OslcDomainConstants.java
!/src/main/java/org/eclipse/lyo/oslc4j/core/model/IDiscussion.java
!/src/main/java/org/eclipse/lyo/oslc4j/core/model/Discussion.java
*.lost

/target/

/.settings/
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@


import org.eclipse.lyo.oslc.domains.FoafDomainConstants;
import org.eclipse.lyo.oslc.domains.FoafVocabularyConstants;

// Start of user code imports
// End of user code
Expand Down Expand Up @@ -148,7 +149,7 @@ public String toString(boolean asLocalResource)
// Start of user code getterAnnotation:name
// End of user code
@OslcName("name")
@OslcPropertyDefinition(FoafDomainConstants.FOAF_NAMSPACE + "name")
@OslcPropertyDefinition(FoafVocabularyConstants.FOAF_NAMSPACE + "name")
@OslcDescription("The full name of a person expressed as simple text string.")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
package org.eclipse.lyo.oslc.domains;

import org.eclipse.lyo.oslc4j.core.model.OslcConstants;

import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants;

// Start of user code imports
// End of user code
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Start of user code Copyright
/*******************************************************************************
* Copyright (c) 2018 Jad El-khoury.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
*
* Jad El-khoury initial implementation
*
* This file is generated by org.eclipse.lyo.oslc4j.codegenerator
*******************************************************************************/
// End of user code

package org.eclipse.lyo.oslc.domains;

import org.eclipse.lyo.oslc4j.core.model.OslcConstants;

// Start of user code imports
// End of user code

public interface DctermsVocabularyConstants
{
// Start of user code user constants
// End of user code

public static String DUBLIN_CORE_NAMSPACE = "http://purl.org/dc/terms/";
public static String DUBLIN_CORE_NAMSPACE_PREFIX = "dcterms";

}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public interface IAgent


@OslcName("name")
@OslcPropertyDefinition(FoafDomainConstants.FOAF_NAMSPACE + "name")
@OslcPropertyDefinition(FoafVocabularyConstants.FOAF_NAMSPACE + "name")
@OslcDescription("The full name of a person expressed as simple text string.")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,23 @@ public interface IPerson


@OslcName("familyName")
@OslcPropertyDefinition(FoafDomainConstants.FOAF_NAMSPACE + "familyName")
@OslcPropertyDefinition(FoafVocabularyConstants.FOAF_NAMSPACE + "familyName")
@OslcDescription("Family name of person expressed as simple text string.")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.String)
@OslcReadOnly(false)
public String getFamilyName();

@OslcName("givenName")
@OslcPropertyDefinition(FoafDomainConstants.FOAF_NAMSPACE + "givenName")
@OslcPropertyDefinition(FoafVocabularyConstants.FOAF_NAMSPACE + "givenName")
@OslcDescription("Given name of person expressed as simple text string. ")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.String)
@OslcReadOnly(false)
public String getGivenName();

@OslcName("name")
@OslcPropertyDefinition(FoafDomainConstants.FOAF_NAMSPACE + "name")
@OslcPropertyDefinition(FoafVocabularyConstants.FOAF_NAMSPACE + "name")
@OslcDescription("The full name of a person expressed as simple text string.")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public interface IRdfsClass


@OslcName("subClassOf")
@OslcPropertyDefinition(RdfsDomainConstants.RDFS_NAMSPACE + "subClassOf")
@OslcPropertyDefinition(RdfsVocabularyConstants.RDFS_NAMSPACE + "subClassOf")
@OslcDescription("used to state that all the instances of one class are instances of another")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.Resource)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@


import org.eclipse.lyo.oslc.domains.FoafDomainConstants;
import org.eclipse.lyo.oslc.domains.FoafVocabularyConstants;

// Start of user code imports
// End of user code
Expand Down Expand Up @@ -154,7 +155,7 @@ public String toString(boolean asLocalResource)
// Start of user code getterAnnotation:familyName
// End of user code
@OslcName("familyName")
@OslcPropertyDefinition(FoafDomainConstants.FOAF_NAMSPACE + "familyName")
@OslcPropertyDefinition(FoafVocabularyConstants.FOAF_NAMSPACE + "familyName")
@OslcDescription("Family name of person expressed as simple text string.")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.String)
Expand All @@ -169,7 +170,7 @@ public String getFamilyName()
// Start of user code getterAnnotation:givenName
// End of user code
@OslcName("givenName")
@OslcPropertyDefinition(FoafDomainConstants.FOAF_NAMSPACE + "givenName")
@OslcPropertyDefinition(FoafVocabularyConstants.FOAF_NAMSPACE + "givenName")
@OslcDescription("Given name of person expressed as simple text string. ")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.String)
Expand All @@ -184,7 +185,7 @@ public String getGivenName()
// Start of user code getterAnnotation:name
// End of user code
@OslcName("name")
@OslcPropertyDefinition(FoafDomainConstants.FOAF_NAMSPACE + "name")
@OslcPropertyDefinition(FoafVocabularyConstants.FOAF_NAMSPACE + "name")
@OslcDescription("The full name of a person expressed as simple text string.")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
package org.eclipse.lyo.oslc.domains;

import org.eclipse.lyo.oslc4j.core.model.OslcConstants;

import org.eclipse.lyo.oslc.domains.RdfVocabularyConstants;

// Start of user code imports
// End of user code
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Start of user code Copyright
/*******************************************************************************
* Copyright (c) 2018 Jad El-khoury.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
*
* Jad El-khoury initial implementation
*
* This file is generated by org.eclipse.lyo.oslc4j.codegenerator
*******************************************************************************/
// End of user code

package org.eclipse.lyo.oslc.domains;

import org.eclipse.lyo.oslc4j.core.model.OslcConstants;

// Start of user code imports
// End of user code

public interface RdfVocabularyConstants
{
// Start of user code user constants
// End of user code

public static String RDF_NAMSPACE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
public static String RDF_NAMSPACE_PREFIX = "rdf";

}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@


import org.eclipse.lyo.oslc.domains.RdfsDomainConstants;
import org.eclipse.lyo.oslc.domains.RdfsVocabularyConstants;
import org.eclipse.lyo.oslc.domains.RdfsClass;

// Start of user code imports
Expand Down Expand Up @@ -149,7 +150,7 @@ public String toString(boolean asLocalResource)
// Start of user code getterAnnotation:subClassOf
// End of user code
@OslcName("subClassOf")
@OslcPropertyDefinition(RdfsDomainConstants.RDFS_NAMSPACE + "subClassOf")
@OslcPropertyDefinition(RdfsVocabularyConstants.RDFS_NAMSPACE + "subClassOf")
@OslcDescription("used to state that all the instances of one class are instances of another")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.Resource)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
package org.eclipse.lyo.oslc.domains;

import org.eclipse.lyo.oslc4j.core.model.OslcConstants;

import org.eclipse.lyo.oslc.domains.RdfsVocabularyConstants;

// Start of user code imports
// End of user code
Expand All @@ -41,7 +41,7 @@ public interface RdfsDomainConstants
public static String RDFS_NAMSPACE_PREFIX = "rdfs";

public static String CLASS_PATH = "class";
public static String CLASS_NAMESPACE = RDFS_NAMSPACE; //namespace of the rdfs:class the resource describes
public static String CLASS_NAMESPACE = RdfsVocabularyConstants.RDFS_NAMSPACE; //namespace of the rdfs:class the resource describes
public static String CLASS_LOCALNAME = "Class"; //localName of the rdfs:class the resource describes
public static String CLASS_TYPE = CLASS_NAMESPACE + CLASS_LOCALNAME; //fullname of the rdfs:class the resource describes
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Start of user code Copyright
/*******************************************************************************
* Copyright (c) 2018 Jad El-khoury.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
*
* Jad El-khoury initial implementation
*
* This file is generated by org.eclipse.lyo.oslc4j.codegenerator
*******************************************************************************/
// End of user code

package org.eclipse.lyo.oslc.domains;

import org.eclipse.lyo.oslc4j.core.model.OslcConstants;

// Start of user code imports
// End of user code

public interface RdfsVocabularyConstants
{
// Start of user code user constants
// End of user code

public static String RDFS_NAMSPACE = "http://www.w3.org/2000/01/rdf-schema#";
public static String RDFS_NAMSPACE_PREFIX = "rdfs";

public static String RDFSCLASS = "RdfsClass";
public static String TYPE_RDFSCLASS = RDFS_NAMSPACE + RDFSCLASS;
}
Loading

0 comments on commit fc3ea10

Please sign in to comment.