當前位置: 首頁>>代碼示例>>Java>>正文


Java Resource.addProperty方法代碼示例

本文整理匯總了Java中com.hp.hpl.jena.rdf.model.Resource.addProperty方法的典型用法代碼示例。如果您正苦於以下問題:Java Resource.addProperty方法的具體用法?Java Resource.addProperty怎麽用?Java Resource.addProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.hp.hpl.jena.rdf.model.Resource的用法示例。


在下文中一共展示了Resource.addProperty方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addDecisionStatusToModel

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
/**
 * Add to the model the decision statuses.
 * 
 * @param Model
 *            the model we are currently working with
 */
public void addDecisionStatusToModel(Model model) {

	List<String> statusesList = Arrays.asList("Published", "Pending_Revocation", "Revoked", "Submitted");

	for (String status : statusesList) {
		String[] statusDtls = hm.findDecisionStatusIndividual(status);
		/** statusResource **/
		Resource statusResource = model.createResource(statusDtls[0], Ontology.decisionStatusResource);
		model.createResource(statusDtls[0], Ontology.conceptResource);
		/** configure prefLabel **/
		statusResource.addProperty(Ontology.prefLabel, statusDtls[1], "el");
		statusResource.addProperty(Ontology.prefLabel, statusDtls[2], "en");
	}

}
 
開發者ID:YourDataStories,項目名稱:harvesters,代碼行數:22,代碼來源:MonthlyRdfActions.java

示例2: addKanonistikiToModel

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
/**
 * Add to the model the Regular Acts.
 * 
 * @param Model
 *            the model we are currently working with
 */
public void addKanonistikiToModel(Model model) {

	List<String> regularList = Arrays.asList("Υπουργική Απόφαση",
			"Πράξη Γενικού Γραμματέα Αποκεντρωμένης Διοίκησης", "Πράξη Οργάνου Διοίκησης Ν.Π.Δ.Δ.",
			"Πράξη Οργάνου Διοίκησης ΟΤΑ Α’ και Β’ Βαθμού (και εποπτευόμενων φορέων τους)",
			"Λοιπές Κανονιστικές Πράξεις");

	for (String regular : regularList) {
		String[] regularDtls = hm.findKanonistikiIndividual(regular);
		/** regulatoryResource **/
		Resource regularResource = model.createResource(regularDtls[0], Ontology.regulatoryActResource);
		model.createResource(regularDtls[0], Ontology.conceptResource);
		/** configure prefLabel **/
		regularResource.addProperty(Ontology.prefLabel, regularDtls[1], "el");
		regularResource.addProperty(Ontology.prefLabel, regularDtls[2], "en");
	}

}
 
開發者ID:YourDataStories,項目名稱:harvesters,代碼行數:25,代碼來源:MonthlyRdfActions.java

示例3: addCollectiveTypeToModel

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
/**
 * Add to the model the Collective Types.
 * 
 * @param Model
 *            the model we are currently working with
 */
public void addCollectiveTypeToModel(Model model) {

	List<String> colTypeList = Arrays.asList("Συλλογικό όργανο Διοίκησης", "Επιτροπή", "Ομάδα εργασίας");

	for (String colType : colTypeList) {
		String[] colTypeDtls = hm.findCollectiveTypeIndividual(colType);
		/** collectiveTypeResource **/
		Resource collectiveTypeResource = model.createResource(colTypeDtls[0], Ontology.collectiveTypeResource);
		model.createResource(colTypeDtls[0], Ontology.conceptResource);
		/** configure prefLabel **/
		collectiveTypeResource.addProperty(Ontology.prefLabel, colTypeDtls[1], "el");
		collectiveTypeResource.addProperty(Ontology.prefLabel, colTypeDtls[2], "en");
	}

}
 
開發者ID:YourDataStories,項目名稱:harvesters,代碼行數:22,代碼來源:MonthlyRdfActions.java

示例4: addCollectiveKindToModel

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
/**
 * Add to the model the Collective Kinds.
 * 
 * @param Model
 *            the model we are currently working with
 */
public void addCollectiveKindToModel(Model model) {

	List<String> colKindList = Arrays.asList("Παύση - Αντικατάσταση μέλους", "Συγκρότηση",
			"Καθορισμός Αμοιβής – Αποζημίωσης");

	for (String colKind : colKindList) {
		String[] colKindDtls = hm.findCollectiveKindIndividual(colKind);
		/** collectiveKindResource **/
		Resource collectiveKindResource = model.createResource(colKindDtls[0], Ontology.collectiveKindResource);
		model.createResource(colKindDtls[0], Ontology.conceptResource);
		/** configure prefLabel **/
		collectiveKindResource.addProperty(Ontology.prefLabel, colKindDtls[1], "el");
		collectiveKindResource.addProperty(Ontology.prefLabel, colKindDtls[2], "en");
	}

}
 
開發者ID:YourDataStories,項目名稱:harvesters,代碼行數:23,代碼來源:MonthlyRdfActions.java

示例5: addSelectionCriteriaToModel

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
/**
    * Add to the model the selection criteria.
    * 
    * @param Model the model we are currently working with
    */
public void addSelectionCriteriaToModel(Model model) {
	
	List<String> criteriaList = Arrays.asList("Χαμηλότερη Τιμή", "Συμφερότερη από οικονομικής άποψης", "Τεχνική ποιότητα");
	
	for (String criterion : criteriaList) {
		String[] selectionDtls = hm.findCriterionIndividual(criterion);
		/** statusResource **/
		Resource statusResource = model.createResource(selectionDtls[0], Ontology.selectionCriterionResource);
		model.createResource(selectionDtls[0], Ontology.conceptResource);
		/** configure prefLabel **/
		statusResource.addProperty(Ontology.prefLabel, selectionDtls[2], "el");
		statusResource.addProperty(Ontology.prefLabel, selectionDtls[3], "en");
       }
	
}
 
開發者ID:YourDataStories,項目名稱:harvesters,代碼行數:21,代碼來源:MonthlyRdfActions.java

示例6: addBudgetTypeToModel

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
/**
    * Add to the model the budget types.
    * 
    * @param Model the model we are currently working with
    */
public void addBudgetTypeToModel(Model model) {
	
	List<String> budgetTypeList = Arrays.asList("Τακτικός Προϋπολογισμός", "Πρόγραμμα Δημοσίων Επενδύσεων", "Ίδια Έσοδα", "Συγχρηματοδοτούμενο Έργο");
	
	for (String budgetType : budgetTypeList) {
		String[] budgetDtls = hm.findBudgetTypeIndividual(budgetType);
		/** statusResource **/
		Resource statusResource = model.createResource(budgetDtls[0], Ontology.budgetCategoryResource);
		model.createResource(budgetDtls[0], Ontology.conceptResource);
		/** configure prefLabel **/
		statusResource.addProperty(Ontology.prefLabel, budgetDtls[1], "el");
		statusResource.addProperty(Ontology.prefLabel, budgetDtls[2], "en");
       }
	
}
 
開發者ID:YourDataStories,項目名稱:harvesters,代碼行數:21,代碼來源:MonthlyRdfActions.java

示例7: addSelectionCriteriaToModel

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
/**
 * Add to the model the selection criteria.
 * 
 * @param Model
 *            the model we are currently working with
 */
public void addSelectionCriteriaToModel(Model model) {

	List<String> criteriaList = Arrays.asList("Χαμηλότερη Τιμή", "Συμφερότερη από οικονομικής άποψης",
			"Τεχνική ποιότητα");

	for (String criterion : criteriaList) {
		String[] selectionDtls = hm.findCriterionIndividual(criterion);
		/** statusResource **/
		Resource statusResource = model.createResource(selectionDtls[0], Ontology.selectionCriterionResource);
		model.createResource(selectionDtls[0], Ontology.conceptResource);
		/** configure prefLabel **/
		statusResource.addProperty(Ontology.prefLabel, selectionDtls[2], "el");
		statusResource.addProperty(Ontology.prefLabel, selectionDtls[3], "en");
	}

}
 
開發者ID:YourDataStories,項目名稱:harvesters,代碼行數:23,代碼來源:MonthlyRdfActions.java

示例8: createObjectProperty

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
private void createObjectProperty(Join join) {
	Resource r = propertyResource(join.attributes1());
	r.addProperty(RDF.type, RDF.Property);
	r.addProperty(RDF.type, OWL.ObjectProperty);
	r.addProperty(RDFS.label, toUniqueString(join.attributes1()));
	r.addProperty(RDFS.domain, classResource(schema.getCorrectCapitalization(join.table1())));
	r.addProperty(RDFS.range, classResource(schema.getCorrectCapitalization(join.table2())));
	r.addProperty(RDFS.isDefinedBy, ontologyResource());		
}
 
開發者ID:aitoralmeida,項目名稱:c4a_data_repository,代碼行數:10,代碼來源:MappingGenerator.java

示例9: addCountriesToModel

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
/**
    * Add to the model the Resources that contain the Countries as retrieved from the respective dictionary
    * 
    * @param Model the model we are currently working with
    * @param DictionaryItems the countries as retrieved from the respective dictionary
    */
public void addCountriesToModel(Model model, DictionaryItems countryList) {
	
	for (DictionaryItem item : countryList.getItems()) {
		Resource fekTypeResource = model.createResource(Ontology.instancePrefix + "Country/" + item.getUid(), Ontology.countryResource);
		String[] countryDtls = countries.findCountryFromAbbreviation(item.getUid());
		fekTypeResource.addLiteral(Ontology.countryId, item.getUid());
		fekTypeResource.addProperty(Ontology.prefLabel, countryDtls[0], "el");
		fekTypeResource.addProperty(Ontology.prefLabel, countryDtls[1], "en");
       }
	
}
 
開發者ID:YourDataStories,項目名稱:harvesters,代碼行數:18,代碼來源:MonthlyRdfActions.java

示例10: addCurrenciesToModel

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
/**
    * Add to the model the Resources that contain the Currencies as retrieved from the respective dictionary
    * 
    * @param Model the model we are currently working with
    * @param DictionaryItems the currencies as retrieved from the respective dictionary
    */
public void addCurrenciesToModel(Model model, DictionaryItems currencyList) {
	
	for (DictionaryItem item : currencyList.getItems()) {
		Resource fekTypeResource = model.createResource(Ontology.instancePrefix + "Currency/" + item.getUid(), Ontology.currencyResource);
		String[] currencyDtls = countries.findCurrencyFromAbbreviation(item.getUid());
		fekTypeResource.addLiteral(Ontology.currencyId, item.getUid());
		fekTypeResource.addProperty(Ontology.prefLabel, currencyDtls[0], "el");
		fekTypeResource.addProperty(Ontology.prefLabel, currencyDtls[1], "en");
       }
	
}
 
開發者ID:YourDataStories,項目名稱:harvesters,代碼行數:18,代碼來源:MonthlyRdfActions.java

示例11: addTranslationResource

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
private Resource addTranslationResource(Resource table, String dbValue, String rdfValue) {
	Resource translation = model.createResource();
	translation.addProperty(D2RQ.databaseValue, dbValue);
	translation.addProperty(D2RQ.rdfValue, rdfValue);
	table.addProperty(D2RQ.translation, translation);
	return translation;
}
 
開發者ID:d2rq,項目名稱:r2rml-kit,代碼行數:8,代碼來源:D2RQReaderTest.java

示例12: addScales

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
private static void addScales(Model model) {

        Resource ratioScale_0_100 = model.createResource("http://linkeddata.es/resource/ldqm/Scale/percentageHigherBest");
        ratioScale_0_100.addProperty(RDF.type, OM.Ratio_scale);
        ratioScale_0_100.addLiteral(QMO.hasLowerBoundary, 0);
        ratioScale_0_100.addLiteral(QMO.hasUpperBoundary, 100);
        ratioScale_0_100.addProperty(QMO.hasRankingFunction, QMO.Ranking_HigherBest);

        Resource ratioScale_0 = model.createResource("http://linkeddata.es/resource/ldqm/Scale/countHigherBest");
        ratioScale_0.addProperty(RDF.type, OM.Ratio_scale);
        ratioScale_0.addLiteral(QMO.hasLowerBoundary, 0);
        ratioScale_0.addProperty(QMO.hasRankingFunction, QMO.Ranking_HigherBest);

    }
 
開發者ID:nandana,項目名稱:ld-sniffer,代碼行數:15,代碼來源:Executor.java

示例13: espaSellers

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
public static void espaSellers() {

        ApplicationContext ctx = new ClassPathXmlApplicationContext("spring.xml");
        SellersService sellers = (SellersService) ctx.getBean("sellersServiceImpl");

        List<Sellers> seller = sellers.getSellers();

        //--------------RDF Model--------------//
        Model model = ModelFactory.createDefaultModel();
        Reasoner reasoner = ReasonerRegistry.getOWLReasoner();
        InfModel infModel = ModelFactory.createInfModel(reasoner, model);

        model.setNsPrefix("elod", OntologySpecification.elodPrefix);
        model.setNsPrefix("gr", OntologySpecification.goodRelationsPrefix);
        model.setNsPrefix("vcard", OntologySpecification.vcardPrefix);

        for (Sellers seller1 : seller) {
            Resource instanceSeller = infModel.createResource(OntologySpecification.instancePrefix + "Organization/" + seller1.getId());
            infModel.add(instanceSeller, RDF.type, OntologySpecification.organizationResource);
            instanceSeller.addProperty(OntologySpecification.name, seller1.getEponimia(), XSDDatatype.XSDstring);
        }

        try {
            FileOutputStream fout = new FileOutputStream(
                    "/Users/giovaf/Documents/yds_pilot1/espa_tests/22-02-2016_ouput/sellersEspa.rdf");
            model.write(fout);
        } catch (IOException e) {
            System.out.println("Exception caught" + e.getMessage());
        }
    }
 
開發者ID:YourDataStories,項目名稱:harvesters,代碼行數:31,代碼來源:SellersImpl.java

示例14: PropertyParser

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
public PropertyParser(){
		this.linemap=new HashMap<Long,IfcdocVO>();
		this.model=ModelFactory.createDefaultModel();
		model.setNsPrefix("ifcdoc",IFCDOC );
		model.setNsPrefix("pset",PSET);
		Resource base=model.createResource(PSET);
		base.addProperty(RDF.type, OWL.Ontology);
		base.addLiteral(DC.creator, "Chi Zhang");
		base.addLiteral(DC.date, "29-03-2016");
		base.addLiteral(DC.description, "This is a vocabulary for the official property sets from IFC 4 documentation. ");
        		
		model.setNsPrefix("ifcowl", IFCOWL);
		model.setNsPrefix("express",EXPRESS);
		model.setNsPrefix("rdfs",RDFS.getURI());
		model.setNsPrefix("rdf",RDF.getURI());
		model.setNsPrefix("xsd", XSD.getURI());
		model.setNsPrefix("schm", SCHM);
		model.setNsPrefix("sp", SP.BASE_URI+"#");
		model.setNsPrefix("spin", SPIN.BASE_URI+"#");
		model.setNsPrefix("spl", SPL.BASE_URI+"#");
        model.setNsPrefix("dc", DC.getURI());
        model.setNsPrefix("owl", OWL.getURI());
//	    ifcSchema.read("src/main/java/nl/tue/ddss/bimsparql/resource/IFC2X3_TC1.owl");
		groups=model.createProperty(PSET,"groups");
		isGroupedBy=model.createProperty(PSET,"isGroupedBy");

			InputStream in=getClass().getClassLoader().getResourceAsStream("IFC2X3_TC1.ttl");
			ifcSchema=ModelFactory.createDefaultModel();
			ifcSchema.read(in,null,"TTL");

		
	}
 
開發者ID:BenzclyZhang,項目名稱:BimSPARQL,代碼行數:33,代碼來源:PropertyParser.java

示例15: generateEntities

import com.hp.hpl.jena.rdf.model.Resource; //導入方法依賴的package包/類
public void generateEntities(Resource class_, TableName table,
		TemplateValueMaker iriTemplate, List<Identifier> blankNodeColumns) {
	if (class_ == null) return;
	Resource c = class_.inModel(model);
	c.addProperty(RDF.type, RDFS.Class);
	c.addProperty(RDF.type, OWL.Class);
	c.addProperty(RDFS.label, getLabel(table));
	if (generatedOntology != null) {
		c.addProperty(RDFS.isDefinedBy, generatedOntology);
	}
	classes.put(table, c);
}
 
開發者ID:d2rq,項目名稱:r2rml-kit,代碼行數:13,代碼來源:OntologyTarget.java


注:本文中的com.hp.hpl.jena.rdf.model.Resource.addProperty方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。