Java Code Examples for com.hp.hpl.jena.graph.Node#createURI()

The following examples show how to use com.hp.hpl.jena.graph.Node#createURI() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 6 votes vote down vote up
/**
 * The method to create {@link RegistrationAuthorityIdentifierResource} on
 * {@link Abbreviation}.
 * 
 * @param internationalCodeDesignator
 *            The identifier of an organization identification scheme.
 * @param organizationIdentifier
 *            The identifier assigned to an Organization within an
 *            organization identification scheme, and unique within that
 *            scheme.The identifier are specified in ISO/IEC 11179-3.
 * @param organizationPartIdentifier
 *            Optional. An identifier allocated to a particular organization
 *            part.The identifier are specified in ISO/IEC 11179-3.
 * @param opiSource
 *            Optional. However, must exist if the
 *            <code>organizationPartIdentifier</code> is specified. The
 *            source for the organization part identifier. The identifier
 *            are specified in ISO/IEC 11179-3.
 * @return {@link RegistrationAuthorityIdentifierResource} on
 *         {@link Abbreviation} with a specific URI generated from
 *         Organization Identifier and Organization Part Identifier.
 */
public RegistrationAuthorityIdentifierResource createRegistrationAuthorityIdentifier(
		String internationalCodeDesignator, String organizationIdentifier,
		String organizationPartIdentifier, String opiSource) {
	if (Util.isNull(internationalCodeDesignator)) {
		throw new IllegalArgumentException(
				"International Code Designator must be specified for RegistrationAuthorityIdentifier.");
	}
	if (Util.isNull(organizationIdentifier)) {
		throw new IllegalArgumentException(
				"Organization Identifier must be specified for RegistrationAuthorityIdentifier.");
	}
	if (!Util.isNull(organizationPartIdentifier)) {
		if (Util.isNull(opiSource)) {
			throw new IllegalArgumentException(
					"Opi Source must be specified for RegistrationAuthorityIdentifier.");
		}
	}
	Node node = Node.createURI(makeID(organizationIdentifier,
			organizationPartIdentifier));
	RegistrationAuthorityIdentifierResource registrationAuthorityIdentifier = new RegistrationAuthorityIdentifierImpl(
			node, (EnhGraph) ontModel, internationalCodeDesignator,
			organizationIdentifier, organizationPartIdentifier, opiSource,
			mdrDatabase);
	return registrationAuthorityIdentifier;
}
 
Example 2
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 6 votes vote down vote up
/**
 * The method to create {@link ClassificationSchemeItemRelationshipResource}
 * on {@link Abbreviation}.
 * 
 * @param classificationSchemeItemRelationshipTypeDescription
 * 
 * @return {@link ClassificationSchemeItemRelationshipResource} on
 *         {@link Abbreviation} with a specific URI generated from
 *         {@link Abbreviation#ClassificationSchemeItemRelationship}.
 */
public ClassificationSchemeItemRelationshipResource createClassificationSchemeItemRelationship(
		String classificationSchemeItemRelationshipTypeDescription) {
	if (Util.isNull(classificationSchemeItemRelationshipTypeDescription)) {
		throw new IllegalArgumentException(
				"Classification Scheme Item Relationship Type Description must be specified for ClassificationSchemeItemRelationship.");
	}
	Node node = Node.createURI(makeID(
			Abbreviation.ClassificationSchemeItemRelationship.toString(),
			classificationSchemeItemRelationshipTypeDescription));
	ClassificationSchemeItemRelationshipResource classificationSchemeItemRelationship = new ClassificationSchemeItemRelationshipImpl(
			node, (EnhGraph) ontModel,
			classificationSchemeItemRelationshipTypeDescription,
			mdrDatabase);
	return classificationSchemeItemRelationship;

}
 
Example 3
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Method to create {@link StewardshipRelationshipResource} on
 * {@link Abbreviation}
 * 
 * @param administerOrganization
 *            Administer Organization
 * @param administer
 *            Contact Details of Administer from Organization
 * @return {@link StewardshipRelationshipResource} on {@link Abbreviation}
 *         with a specific URI generated from
 *         {@link Abbreviation#Stewardship} and parameters
 */
public StewardshipRelationshipResource createStewardshipRelationship(
		OrganizationResource administerOrganization,
		StewardshipResource administer) {
	if (administerOrganization == null) {
		throw new IllegalArgumentException(
				"Organization must be specified for the StewardshipRelationship");
	}
	if (administer == null) {
		throw new IllegalArgumentException(
				"Submission must be specified for the StewardshipRelationship");
	}
	Node node = Node.createURI(makeID(Abbreviation.Stewardship,
			administerOrganization.getOrganizationName(), administer
					.getStewardshipContact().getContactName()));
	StewardshipRelationshipResource stewardshipRelationship = new StewardshipRelationshipImpl(
			node, (EnhGraph) ontModel, administerOrganization, administer,
			mdrDatabase);
	return stewardshipRelationship;
}
 
Example 4
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Method to create {@link ConceptualDomainRelationshipAssociationResource}
 * on {@link Abbreviation}
 * 
 * @param describedByConceptualDomainRelationship
 *            ConceptualDomainRelationship which has type description for
 *            the association
 * @return {@link ConceptualDomainRelationshipAssociationResource} on
 *         {@link Abbreviation} with a specific URI generated from
 *         {@link Abbreviation#ConceptualDomainRelationship}, parameters and
 *         unique UUID
 */
public ConceptualDomainRelationshipAssociationResource createConceptualDomainRelationshipAssociation(
		ConceptualDomainRelationshipResource describedByConceptualDomainRelationship) {
	if (describedByConceptualDomainRelationship == null) {
		throw new IllegalArgumentException(
				"ConceptualDomainRelationship must be specified for ConceptualDomainRelationshipAssociation.");
	}
	String uniqueId = generateUniqueID();
	Node node = Node.createURI(makeID(
			Abbreviation.ConceptualDomainRelationship.toString(),
			describedByConceptualDomainRelationship
					.getConceptualDomainRelationshipTypeDescription(),
			uniqueId));
	ConceptualDomainRelationshipAssociationResource conceptualDomainRelationshipAssociation = new ConceptualDomainRelationshipAssociationImpl(
			node, (EnhGraph) ontModel,
			describedByConceptualDomainRelationship, mdrDatabase);
	return conceptualDomainRelationshipAssociation;
}
 
Example 5
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Method to create
 * {@link DataElementConceptRelationshipAssociationResource} on
 * {@link Abbreviation}
 * 
 * @param describedByDataElementConceptRelationship
 *            DataElementConceptRelationship which has type description for
 *            the association
 * @return {@link DataElementConceptRelationshipAssociationResource} on
 *         {@link Abbreviation} with a specific URI generated from
 *         {@link Abbreviation#DataElementConceptRelationship}, parameters
 *         and unique UUID
 */
public DataElementConceptRelationshipAssociationResource createDataElementConceptRelationshipAssociation(
		DataElementConceptRelationshipResource describedByDataElementConceptRelationship) {
	if (describedByDataElementConceptRelationship == null) {
		throw new IllegalArgumentException(
				"DataElementConceptRelationship must be specified for DataElementConceptRelationshipAssociation.");
	}
	String uniqueId = generateUniqueID();
	Node node = Node.createURI(makeID(
			Abbreviation.DataElementConceptRelationship.toString(),
			describedByDataElementConceptRelationship
					.getDataElementConceptRelationshipTypeDescription(),
			uniqueId));
	DataElementConceptRelationshipAssociationResource dataElementConceptRelationshipAssociation = new DataElementConceptRelationshipAssociationImpl(
			node, (EnhGraph) ontModel,
			describedByDataElementConceptRelationship, mdrDatabase);
	return dataElementConceptRelationshipAssociation;
}
 
Example 6
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * The method to create {@link LanguageIdentificationResource} on
 * {@link Abbreviation}.
 * 
 * @param languageIdentifier
 *            Use the three character alphabetic codes from ISO
 *            639-2/Terminology, with extensions if required.
 * @param countryIdentifier
 *            Optional. Use the three digit numeric codes from ISO 3166-1,
 *            with extensions if required.
 * @return {@link LanguageIdentificationResource} on {@link Abbreviation}
 *         with a specific URI generated from parameters.
 */
public LanguageIdentificationResource createLanguageIdentification(
		Language languageIdentifier, Country countryIdentifier) {
	if (languageIdentifier == null) {
		throw new IllegalArgumentException(
				"Language must be specified  for LanguageIdentification.");
	}

	Node node = Node
			.createURI(makeID(languageIdentifier, countryIdentifier));
	LanguageIdentificationResource languageIdentification = new LanguageIdentificationImpl(
			node, (EnhGraph) ontModel, languageIdentifier,
			countryIdentifier, mdrDatabase);
	return languageIdentification;
}
 
Example 7
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Method to create {@link SubmissionResource} on {@link Abbreviation}
 * 
 * @param submissionContact
 *            Submitter Contact Details of The Submission
 * @return {@link SubmissionResource} on {@link Abbreviation} with a
 *         specific URI generated from {@value Abbreviation#Submission} and
 *         {@link ContactResource#getContactName()}
 */
public SubmissionResource createSubmission(ContactResource submissionContact) {
	if (submissionContact == null) {
		throw new IllegalArgumentException(
				"Submission Contact must be specified for Submission");
	}
	Node node = Node.createURI(makeID(Abbreviation.Submission,
			submissionContact.getContactName()));
	SubmissionResource submission = new SubmissionImpl(node,
			(EnhGraph) ontModel, submissionContact, mdrDatabase);
	return submission;
}
 
Example 8
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
public RepresentationClassResource createRepresentationClass(
		AdministrationRecordResource representationClassAdministrationRecord,
		StewardshipRelationshipResource administeredBy,
		SubmissionRelationshipResource submittedBy,
		RegistrationAuthorityResource registeredBy,
		AdministeredItemContextResource having) {
	if (representationClassAdministrationRecord == null) {
		throw new IllegalArgumentException(
				"AdministrationRecord must be specified for Representation Class.");
	}
	if (administeredBy == null) {
		throw new IllegalArgumentException(
				"Stewardship must be specified for RepresentationClass.");
	}
	if (submittedBy == null) {
		throw new IllegalArgumentException(
				"Submission must be specified for RepresentationClass.");
	}
	if (registeredBy == null) {
		throw new IllegalArgumentException(
				"Registration Authority must be specified for RepresentationClass.");
	}
	if (having == null) {
		throw new IllegalArgumentException(
				"Administered Item Context must be specified for RepresentationClass.");
	}
	String uniqueID = representationClassAdministrationRecord
			.getAdministeredItemIdentifier().getDataIdentifier();
	Node node = Node.createURI(makeID(
			Abbreviation.RepresentationClass.toString(), uniqueID));
	return new RepresentationClassImpl(node, (EnhGraph) ontModel,
			representationClassAdministrationRecord, administeredBy,
			submittedBy, registeredBy, having, mdrDatabase);
}
 
Example 9
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Method to create {@link DataElementConceptRelationshipResource} on
 * {@link Abbreviation}
 * 
 * @param dataElementConceptRelationshipTypeDescription
 * @return {@link DataElementConceptRelationshipResource} on
 *         {@link Abbreviation} with a specific URI generated from
 *         {@link Abbreviation#DataElementConceptRelationship
 */
public DataElementConceptRelationshipResource createDataElementConceptRelationship(
		String dataElementConceptRelationshipTypeDescription) {
	if (Util.isNull(dataElementConceptRelationshipTypeDescription)) {
		throw new IllegalArgumentException(
				"Type Description must be specified for DataElementConceptRelationship.");
	}
	Node node = Node.createURI(makeID(
			Abbreviation.DataElementConceptRelationship.toString(),
			dataElementConceptRelationshipTypeDescription));
	DataElementConceptRelationshipResource dataElementConceptRelationship = new DataElementConceptRelationshipImpl(
			node, (EnhGraph) ontModel,
			dataElementConceptRelationshipTypeDescription, mdrDatabase);
	return dataElementConceptRelationship;
}
 
Example 10
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * The method to create {@link RegistrationAuthorityResource} on
 * {@link Abbreviation}
 * 
 * @param registrationAuthorityIdentifier
 *            Identifier of Registration Authority
 * @param documentationLanguageIdentifier
 *            Language Identification for Documentation
 * @param organizationName
 *            Name of the Organization
 * @param organizationMailAddress
 *            Optional. Mail Address of the Organization
 * @param representedBy
 *            Person who perform the administrative steps to register
 *            Administered Items
 * 
 * @return {@link RegistrationAuthorityResource} on {@link Abbreviation}
 *         with a specific URI generated from
 *         {@link Abbreviation#RegistrationAuthority} and parameter
 *         <code>registrationAuthorityIdentifier</code>
 */
public RegistrationAuthorityResource createRegistrationAuthority(
		RegistrationAuthorityIdentifierResource registrationAuthorityIdentifier,
		LanguageIdentificationResource documentationLanguageIdentifier,
		String organizationName, String organizationMailAddress,
		RegistrarResource representedBy) {
	if (registrationAuthorityIdentifier == null) {
		throw new IllegalArgumentException(
				"Registration Authority Identifier must be specified for RegistrationAuthority");
	}
	if (documentationLanguageIdentifier == null) {
		throw new IllegalArgumentException(
				"Documentation Language Identifier must be specified for RegistrationAuthority");
	}
	if (Util.isNull(organizationName)) {
		throw new IllegalArgumentException(
				"Organization Name must be specified for the RegistrationAuthority");
	}
	if (representedBy == null) {
		throw new IllegalArgumentException(
				"Registrar must be specified for RegistrationAuthoity");
	}

	Node node = Node
			.createURI(makeID(Abbreviation.RegistrationAuthority,
					registrationAuthorityIdentifier
							.getOrganizationIdentifier(),
					registrationAuthorityIdentifier
							.getOrganizationPartIdentifier()));
	RegistrationAuthorityResource registrationAuthority = new RegistrationAuthorityImpl(
			node, (EnhGraph) ontModel, registrationAuthorityIdentifier,
			documentationLanguageIdentifier, organizationName,
			organizationMailAddress, representedBy, mdrDatabase);
	return registrationAuthority;
}
 
Example 11
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * The method to create {@link OrganizationResource} on {@link Abbreviation}
 * 
 * @param organizationName
 *            Name of the Organization
 * @param organizationMailAddress
 *            Optional. Mail Address of the Organization
 * @return {@link OrganizationResource} on {@link Abbreviation} with a
 *         specific URI generated from {@link Abbreviation#Organization} and
 *         parameters
 */
public OrganizationResource createOrganization(String organizationName,
		String organizationMailAddress) {
	if (Util.isNull(organizationName)) {
		throw new IllegalArgumentException(
				"Organization Name must be specified for the Organization");
	}
	Node node = Node.createURI(makeID(Abbreviation.Organization.toString(),
			organizationName));
	OrganizationResource organization = new OrganizationImpl(node,
			(EnhGraph) ontModel, organizationName, organizationMailAddress,
			mdrDatabase);
	return organization;
}
 
Example 12
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Method to create {@link ConceptualDomainRelationshipResource} on
 * {@link Abbreviation}
 * 
 * @param ConceptualDomainRelationshipTypeDescription
 * @return {@link ConceptualDomainRelationshipResource} on
 *         {@link Abbreviation} with a specific URI generated from
 *         {@link Abbreviation#ConceptualDomainRelationship
 */
public ConceptualDomainRelationshipResource createConceptualDomainRelationship(
		String conceptualDomainRelationshipTypeDescription) {
	if (Util.isNull(conceptualDomainRelationshipTypeDescription)) {
		throw new IllegalArgumentException(
				"Type Description must be specified for ConceptualDomainRelationship.");
	}
	Node node = Node.createURI(makeID(
			Abbreviation.ConceptualDomainRelationship.toString(),
			conceptualDomainRelationshipTypeDescription));
	ConceptualDomainRelationshipResource conceptualDomainRelationship = new ConceptualDomainRelationshipImpl(
			node, (EnhGraph) ontModel,
			conceptualDomainRelationshipTypeDescription, mdrDatabase);
	return conceptualDomainRelationship;
}
 
Example 13
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Method to create {@link ValueResource} on {@link Abbreviation}
 * 
 * @param valueItem
 *            Actual value associated with Enumeration Permissible Value
 * @return {@link ValueResource} on {@link Abbreviation} with a specific URI
 *         generated {@link Abbreviation#Value} and <code>valueItem</code>
 */
public ValueResource createValue(String valueItem) {
	if (Util.isNull(valueItem)) {
		throw new IllegalArgumentException(
				"Value Item must be specified for Value.");
	}
	Node node = Node.createURI(makeID(Abbreviation.Value.toString(),
			valueItem));
	ValueResource value = new ValueImpl(node, (EnhGraph) ontModel,
			valueItem, mdrDatabase);
	return value;
}
 
Example 14
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Method to create {@link PermissibleValueResource} on {@link Abbreviation}
 * 
 * @param permissibleValueBeginDate
 *            Calendar Object specifying begni date of value
 * @param permissibleValueEndDate
 *            Optional.
 * @param hasPermittedValue
 *            Value of the Enumeration
 * @param hasPermissibleValueMeaning
 *            Meaning of the Enumeration Value
 * @return {@link PermissibleValueResource} on {@link Abbreviation} with a
 *         specific URI generated from {@link Abbreviation#PermissibleValue}
 *         and parameters
 */
public PermissibleValueResource createPermissibleValue(
		Calendar permissibleValueBeginDate,
		Calendar permissibleValueEndDate, ValueResource hasPermittedValue,
		ValueMeaningResource hasPermissibleValueMeaning) {
	if (permissibleValueBeginDate == null) {
		throw new IllegalArgumentException(
				"Permissible Value Begin Date must be specified for PermissibleValue");
	}
	if (hasPermittedValue == null) {
		throw new IllegalArgumentException(
				"Value must be specified for PermissibleValue.");
	}
	if (hasPermissibleValueMeaning == null) {
		throw new IllegalArgumentException(
				"Value Meaning must be specified for PermissibleValue.");
	}

	Node node = Node.createURI(makeID(
			Abbreviation.PermissibleValue.toString(),
			hasPermissibleValueMeaning.getValueMeaningIdentifier(),
			hasPermittedValue.getValueItem()));
	PermissibleValueResource permissibleValue = new PermissibleValueImpl(
			node, (EnhGraph) ontModel, permissibleValueBeginDate,
			permissibleValueEndDate, hasPermittedValue,
			hasPermissibleValueMeaning, mdrDatabase);
	return permissibleValue;
}
 
Example 15
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Method to create {@link LanguageSectionResource} on {@link Abbreviation}
 * 
 * @param languageSectionLanguageIdentifier
 *            {@link LanguageIdentificationResource} identifying the
 *            LanguageSection.
 * @return {@link LanguageSectionResource} on {@link Abbreviation} with a
 *         specific URI genereted from {@link Abbreviation#LanguageSection}
 *         and parameter
 */
public LanguageSectionResource createLanguageSection(
		LanguageIdentificationResource languageSectionLanguageIdentifier) {
	if (languageSectionLanguageIdentifier == null) {
		throw new IllegalArgumentException(
				"Language Identification must be specified for Language Section");
	}
	String uniqueID = generateUniqueID();
	Node node = Node.createURI(makeID(Abbreviation.LanguageSection,
			uniqueID));
	LanguageSectionResource languageSection = new LanguageSectionImpl(node,
			(EnhGraph) ontModel, languageSectionLanguageIdentifier,
			mdrDatabase);
	return languageSection;
}
 
Example 16
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * The method to create {@link ItemIdentifierResource} on
 * {@link Abbreviation}.
 * 
 * @param registrationAuthorityIdentifier
 *            The identifier for the owning Registration Authority.
 * @param uniqueID
 *            OPtional. IF not provided, then overriding method with random
 *            ID generator is called
 * @return {@link ItemIdentifierResource} on {@link Abbreviation} with a
 *         specific URI generated from {@link Abbreviation#ItemIdentifier}.
 */
public ItemIdentifierResource createItemIdentifier(
		RegistrationAuthorityIdentifierResource registrationAuthorityIdentifier,
		String uniqueID) {
	if (registrationAuthorityIdentifier == null) {
		throw new IllegalArgumentException(
				"Registration Authority Identifier must be specified for ItemIdentifier.");
	}
	Node node = Node.createURI(makeID(
			Abbreviation.ItemIdentifier.toString(), uniqueID));
	ItemIdentifierResource itemIdentifier = new ItemIdentifierImpl(node,
			(EnhGraph) ontModel, registrationAuthorityIdentifier, uniqueID,
			DEFAULT_VERSION, mdrDatabase);
	return itemIdentifier;
}
 
Example 17
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * The method to create {@link ItemIdentifierResource} on
 * {@link Abbreviation}.
 * 
 * @param registrationAuthorityIdentifier
 *            The identifier for the owning Registration Authority.
 * @param uniqueID
 *            OPtional. IF not provided, then overriding method with random
 *            ID generator is called
 * @return {@link ItemIdentifierResource} on {@link Abbreviation} with a
 *         specific URI generated from {@link Abbreviation#ItemIdentifier}.
 */
public ItemIdentifierResource createItemIdentifier(
		RegistrationAuthorityIdentifierResource registrationAuthorityIdentifier) {
	if (registrationAuthorityIdentifier == null) {
		throw new IllegalArgumentException(
				"Registration Authority Identifier must be specified for ItemIdentifier.");
	}
	String uniqueID = generateUniqueID();
	Node node = Node.createURI(makeID(
			Abbreviation.ItemIdentifier.toString(), uniqueID));
	ItemIdentifierResource itemIdentifier = new ItemIdentifierImpl(node,
			(EnhGraph) ontModel, registrationAuthorityIdentifier, uniqueID,
			DEFAULT_VERSION, mdrDatabase);
	return itemIdentifier;
}
 
Example 18
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Method to create {@link ValueDomainRelationshipResource} on
 * {@link Abbreviation}
 * 
 * @param ValueDomainRelationshipTypeDescription
 * @return {@link ValueDomainRelationshipResource} on {@link Abbreviation}
 *         with a specific URI generated from
 *         {@link Abbreviation#ValueDomainRelationship
 */
public ValueDomainRelationshipResource createValueDomainRelationship(
		String valueDomainRelationshipTypeDescription) {
	if (Util.isNull(valueDomainRelationshipTypeDescription)) {
		throw new IllegalArgumentException(
				"Type Description must be specified for ValueDomainRelationship.");
	}
	Node node = Node.createURI(makeID(
			Abbreviation.ValueDomainRelationship.toString(),
			valueDomainRelationshipTypeDescription));
	ValueDomainRelationshipResource valueDomainRelationship = new ValueDomainRelationshipImpl(
			node, (EnhGraph) ontModel,
			valueDomainRelationshipTypeDescription, mdrDatabase);
	return valueDomainRelationship;
}
 
Example 19
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 4 votes vote down vote up
/**
 * The method to create {@link ContextResource} on {@link Abbreviation}.
 * 
 * @param contextAdministrationRecord
 *            The Administration Record for a Context.
 * @param contextDescription
 *            The textual description of the Context.
 * @param contextDescriptionLanguageIdentifier
 *            Optional. The identifier of the language used in the context
 *            description.
 * @param administeredBy
 *            An Administered Item is administered by an
 *            {@link OrganizationResource} represented by the
 *            {@link StewardshipRelationshipResource}.
 * @param submittedBy
 *            An Administered Item is submitted by an
 *            {@link OrganizationResource} represented by the
 *            {@link SubmissionRelationshipResource}.
 * @param registeredBy
 *            An {@link AdministeredItemResource} is registered by a
 *            {@link RegistrationAuthorityResource} represented by the
 *            relationship registration.
 * @param having
 *            An {@link AdministeredItemResource} has to have at least one
 *            {@link AdministeredItemContextResource}.
 * @return {@link ContextResource} on {@link Abbreviation} with a specific
 *         URI generated from {@link Abbreviation#Context}.
 */
public ContextResource createContext(
		AdministrationRecordResource contextAdministrationRecord,
		String contextDescription,
		LanguageIdentificationResource contextDescriptionLanguageIdentifier,
		StewardshipRelationshipResource administeredBy,
		SubmissionRelationshipResource submittedBy,
		RegistrationAuthorityResource registeredBy,
		AdministeredItemContextResource having) {

	if (contextAdministrationRecord == null) {
		throw new IllegalArgumentException(
				"Context Administration Record must be specified for Context.");
	}
	if (Util.isNull(contextDescription)) {
		throw new IllegalArgumentException(
				"Context Description must be specified for Context.");
	}
	if (administeredBy == null) {
		throw new IllegalArgumentException(
				"StewardshipRelationship must be specified for Classification Scheme");
	}
	if (submittedBy == null) {
		throw new IllegalArgumentException(
				"SubmissionRelationship must be specified for ClassificationScheme");
	}
	if (registeredBy == null) {
		throw new IllegalArgumentException(
				"Registration Authority must be specified for Classification Scheme");
	}
	if (having == null) {
		throw new IllegalArgumentException(
				"Administered Item Context must be specified for Classification Scheme");
	}
	String uniqueID = contextAdministrationRecord
			.getAdministeredItemIdentifier().getDataIdentifier();
	Node node = Node.createURI(makeID(Abbreviation.Context.toString(),
			uniqueID));
	ContextResource context = new ContextImpl(node, (EnhGraph) ontModel,
			contextAdministrationRecord, contextDescription,
			contextDescriptionLanguageIdentifier, administeredBy,
			submittedBy, registeredBy, having, mdrDatabase);
	return context;
}
 
Example 20
Source File: MDRResourceFactory.java    From semanticMDR with GNU General Public License v3.0 4 votes vote down vote up
/**
 * The method to create {@link DataElementResource} on {@link Abbreviation}.
 * 
 * @param dataElementAdministrationRecord
 *            The Administration Record for an Data Element.
 * @param representationClassQualifier
 *            Optional. A qualifier to the Representation Class used in
 *            naming Data Elements and Value Domains.
 * @param dataElementPrecision
 *            Optional. The degree of specificity for a Data Element.
 * @param administeredBy
 *            An Administered Item is administered by an
 *            {@link OrganizationResource} represented by the
 *            {@link StewardshipRelationshipResource}.
 * @param submittedBy
 *            An Administered Item is submitted by an
 *            {@link OrganizationResource} represented by the
 *            {@link SubmissionRelationshipResource}.
 * @param registeredBy
 *            An {@link AdministeredItemResource} is registered by a
 *            {@link RegistrationAuthorityResource} represented by the
 *            relationship registration.
 * @param having
 *            An {@link AdministeredItemResource} has to have at least one
 *            {@link AdministeredItemContextResource}
 * @param expressingDataElementConceptExpression
 *            An {@link DataElementResource} has to have at least one
 *            {@link DataElementConceptResource}
 * @param representedByDataElementRepresentation
 *            An {@link DataElementResource} has to have at least one
 *            {@link ValueDomainResource}
 * @return {@link DataElementResource} on {@link Abbreviation} with a
 *         specific URI generated from {@link Abbreviation#DataElement}.
 */
public DataElementResource createDataElement(
		AdministrationRecordResource dataElementAdministrationRecord,
		String representationClassQualifier, Integer dataElementPrecision,
		StewardshipRelationshipResource administeredBy,
		SubmissionRelationshipResource submittedBy,
		RegistrationAuthorityResource registeredBy,
		AdministeredItemContextResource having,
		DataElementConceptResource expressingDataElementConceptExpression,
		ValueDomainResource representedByDataElementRepresentation) {
	if (dataElementAdministrationRecord == null) {
		throw new IllegalArgumentException(
				"Data Element Administration Record must be specified for DataElement.");
	}
	if (administeredBy == null) {
		throw new IllegalArgumentException(
				"StewardshipRelationship must be specified for Classification Scheme");
	}
	if (submittedBy == null) {
		throw new IllegalArgumentException(
				"SubmissionRelationship must be specified for ClassificationScheme");
	}
	if (registeredBy == null) {
		throw new IllegalArgumentException(
				"Registration Authority must be specified for Classification Scheme");
	}
	if (having == null) {
		throw new IllegalArgumentException(
				"Administered Item Context must be specified for Classification Scheme");
	}
	if (expressingDataElementConceptExpression == null) {
		throw new IllegalArgumentException(
				"Data Element Concept must be specified for Data Element.");
	}
	if (representedByDataElementRepresentation == null) {
		throw new IllegalArgumentException(
				"Value Domain must be specified for Data Element.");
	}
	String uniqueID = dataElementAdministrationRecord
			.getAdministeredItemIdentifier().getDataIdentifier();
	Node node = Node.createURI(makeID(Abbreviation.DataElement.toString(),
			uniqueID));
	DataElementResource dataElement = new DataElementImpl(node,
			(EnhGraph) ontModel, dataElementAdministrationRecord,
			representationClassQualifier, dataElementPrecision,
			administeredBy, submittedBy, registeredBy, having,
			expressingDataElementConceptExpression,
			representedByDataElementRepresentation, mdrDatabase);
	return dataElement;
}