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

Consider tightening data relationship source & target operation return types #304

Open
NicolasRouquette opened this issue Sep 17, 2018 · 1 comment
Assignees

Comments

@NicolasRouquette
Copy link
Member

Instead of:

abstract class DataRelationship extends Term, DirectedBinaryRelationshipKind {
        ...
	op Datatype[1] target()
}

class EntityScalarDataProperty extends DataRelationship, DataRelationshipFromEntity, DataRelationshipToScalar {
        ...
	op Datatype[1] target() { range }
}

class ScalarDataProperty extends DataRelationship, DataRelationshipFromStructure, DataRelationshipToScalar {
        ...
	op Datatype[1] target() { range }
}
class EntityStructuredDataProperty extends DataRelationship, DataRelationshipFromEntity, DataRelationshipToStructure {
	...
	op Datatype[1] target() { range }
}
class StructuredDataProperty extends DataRelationship, DataRelationshipFromStructure, DataRelationshipToStructure {
	...
	op Datatype[1] target() { range }
}

Consider replacing the return type with the most specific DataType appropriate:

abstract class DataRelationship extends Term, DirectedBinaryRelationshipKind {
        ...
	op Datatype[1] target()
	
}

class EntityScalarDataProperty extends DataRelationship, DataRelationshipFromEntity, DataRelationshipToScalar {
        ...
	op DataRange[1] target() { range }
}

class ScalarDataProperty extends DataRelationship, DataRelationshipFromStructure, DataRelationshipToScalar {
        ...
	op DataRange[1] target() { range }
}
class EntityStructuredDataProperty extends DataRelationship, DataRelationshipFromEntity, DataRelationshipToStructure {
	...
	op Structure[1] target() { range }
}
class StructuredDataProperty extends DataRelationship, DataRelationshipFromStructure, DataRelationshipToStructure {
	...
	op Structure[1] target() { range }
}
@NicolasRouquette NicolasRouquette self-assigned this Sep 17, 2018
@NicolasRouquette NicolasRouquette changed the title Consider tightening data relationship target operation return types Consider tightening data relationship source & target operation return types Sep 17, 2018
@NicolasRouquette
Copy link
Member Author

Ditto for source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant